diff --git a/index.d.ts b/index.d.ts index ad55c5d3..98490b9c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,8 +11,6 @@ type ParseCallback = (icon: string, options: object, variant: string) => string type ReplacerFunction = (substring: string, ...args: any[]) => string; -type Replacer = string | ReplacerFunction; - interface TwemojiOptions { /** * Default: MaxCDN @@ -87,7 +85,7 @@ type Twemoji = { toCodePoint(utf16surrogatePairs: string, sep?: string): string; }; parse(node: T, options?: TwemojiOptions | ParseCallback): T; - replace(text: string, replacer: Replacer): string; + replace(text: string, replacer: string | ReplacerFunction): string; test(text: string): boolean; onerror(): void; };