2022-03-14 13:39:00 +00:00
|
|
|
declare interface TwemojiOptions {
|
2020-02-13 14:50:17 +00:00
|
|
|
/**
|
|
|
|
* Default: MaxCDN
|
|
|
|
*/
|
|
|
|
base?: string;
|
|
|
|
/**
|
|
|
|
* Default: .png
|
|
|
|
*/
|
|
|
|
ext?: string;
|
|
|
|
/**
|
|
|
|
* Default: emoji
|
|
|
|
*/
|
|
|
|
className?: string;
|
|
|
|
/**
|
|
|
|
* Default: 72x72
|
|
|
|
*/
|
|
|
|
size?: string | number;
|
|
|
|
/**
|
|
|
|
* To render with SVG use `folder: svg, ext: .svg`
|
|
|
|
*/
|
|
|
|
folder?: string;
|
|
|
|
/**
|
|
|
|
* The function to invoke in order to generate image src(s).
|
|
|
|
*/
|
|
|
|
callback?(icon: string, options: TwemojiOptions): void;
|
|
|
|
/**
|
|
|
|
* Default () => ({})
|
|
|
|
*/
|
|
|
|
attributes?(): void;
|
|
|
|
}
|
|
|
|
|
2022-03-14 15:01:32 +00:00
|
|
|
declare type Twemoji = {
|
2020-02-13 14:50:17 +00:00
|
|
|
convert: {
|
|
|
|
fromCodePoint(hexCodePoint: string): string;
|
|
|
|
toCodePoint(utf16surrogatePairs: string): string;
|
|
|
|
};
|
2022-03-14 14:48:25 +00:00
|
|
|
parse(node: HTMLElement | string, options?: TwemojiOptions): void;
|
2020-02-13 14:50:17 +00:00
|
|
|
};
|
|
|
|
|
2022-03-14 15:01:32 +00:00
|
|
|
declare module 'twemoji' {
|
|
|
|
const twemoji: Twemoji;
|
2022-03-14 14:48:25 +00:00
|
|
|
export default twemoji;
|
2022-03-14 15:01:32 +00:00
|
|
|
}
|