1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-11-16 11:18:37 +00:00

chore(typescript): adds definitions

This commit is contained in:
Alexander Gusev 2020-02-13 16:50:17 +02:00 committed by Justine De Caires
parent 8e5c8c7fed
commit a10463bdbc

41
index.d.ts vendored Normal file
View File

@ -0,0 +1,41 @@
interface TwemojiOptions {
/**
* 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;
}
const twemoji: {
convert: {
fromCodePoint(hexCodePoint: string): string;
toCodePoint(utf16surrogatePairs: string): string;
};
parse(node: HTMLElement | string, options?: TwemojiOptions): void;
};
export default twemoji;