12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- export type ParseCallback = (icon: string, options: object, variant: string) => string | false;
- export type ReplacerFunction = (substring: string, ...args: any[]) => string;
- export type TwemojiOptions = {
-
- base?: string;
-
- ext?: string;
-
- className?: string;
-
- size?: string | number;
-
- folder?: string;
-
- callback?: ParseCallback
-
- attributes?(icon: string, variant: string): object;
- }
- export type Twemoji = {
- base: string;
- ext: string;
- className: string;
- size: string;
- convert: {
-
- fromCodePoint(hexCodePoint: string): string;
-
- toCodePoint(utf16surrogatePairs: string, sep?: string): string;
- };
- parse<T extends string | HTMLElement>(node: T, options?: TwemojiOptions | ParseCallback): T;
- replace(text: string, replacer: string | ReplacerFunction): string;
- test(text: string): boolean;
- onerror(): void;
- };
- declare module 'twemoji' {
- const twemoji: Twemoji;
- export default twemoji;
- }
|