From d4f133bf7e0ab49584a4ed79aae935104715c6af Mon Sep 17 00:00:00 2001 From: Harold Thetiot Date: Mon, 14 Mar 2022 14:39:00 +0100 Subject: [PATCH] fix #532: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier, and twemoji.parse return type --- index.d.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 1c0b4cf0..3f34fb53 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -interface TwemojiOptions { +declare interface TwemojiOptions { /** * Default: MaxCDN */ @@ -29,13 +29,12 @@ interface TwemojiOptions { attributes?(): void; } -const twemoji: { +export const twemoji: { convert: { fromCodePoint(hexCodePoint: string): string; toCodePoint(utf16surrogatePairs: string): string; }; - parse(node: HTMLElement | string, options?: TwemojiOptions): void; + parse(node: HTMLElement | string, options?: TwemojiOptions): string; }; -export default twemoji; - +export default twemoji; \ No newline at end of file