From 9110fc85c0ad8b896c2cad075a5625767d87488d Mon Sep 17 00:00:00 2001 From: Harold Thetiot Date: Mon, 14 Mar 2022 15:48:25 +0100 Subject: [PATCH] declare twemoji type and twemoji module in index.d.ts --- index.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index b818f39e..08f552cf 100644 --- a/index.d.ts +++ b/index.d.ts @@ -29,12 +29,15 @@ declare interface TwemojiOptions { attributes?(): void; } -declare const twemoji: { +declare type twemoji = { convert: { fromCodePoint(hexCodePoint: string): string; toCodePoint(utf16surrogatePairs: string): string; }; - parse(node: HTMLElement | string, options?: TwemojiOptions): string; + parse(node: HTMLElement | string, options?: TwemojiOptions): void; }; -export default twemoji; \ No newline at end of file +declare module "twemoji" { + const twemoji: twemoji; + export default twemoji; +} \ No newline at end of file