From 000dc9a7c611f93429a29f641f6b1952f8dc8d69 Mon Sep 17 00:00:00 2001 From: Alexey Molchan Date: Sat, 30 Apr 2022 09:40:40 +0300 Subject: [PATCH] removed type alias --- index.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; };