diff --git a/emojione/emojione-test.ts b/emojione/emojione-test.ts new file mode 100644 index 0000000000..cdb38d7c90 --- /dev/null +++ b/emojione/emojione-test.ts @@ -0,0 +1,15 @@ +/// + +emojione.sprites = true; +emojione.imagePathPNG = 'foobar'; +emojione.imagePathSVG = 'foobar'; +emojione.imagePathSVGSprites = 'foobar'; +emojione.imageType = 'svg'; +emojione.unicodeAlt = false; +emojione.ascii = true; +emojione.unicodeRegexp = '123.*'; +emojione.cacheBustParam = 'asdf'; +const myShort: string = emojione.toShort('hi'); +const myImage1: string = emojione.toImage('hi'); +const myImage2: string = emojione.shortnameToImage('hi'); +const myImage3: string = emojione.unicodeToImage('hi'); diff --git a/emojione/emojione.d.ts b/emojione/emojione.d.ts new file mode 100644 index 0000000000..f273d34460 --- /dev/null +++ b/emojione/emojione.d.ts @@ -0,0 +1,20 @@ +// Type definitions for emojione +// Project: https://github.com/Ranks/emojione +// Definitions by: Danilo Bargen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var emojione: { + sprites: boolean, + imagePathPNG: string, + imagePathSVG: string, + imagePathSVGSprites: string, + imageType: 'png' | 'svg', + unicodeAlt: boolean, + ascii: boolean, + unicodeRegexp: string, + cacheBustParam: string, + toShort: (str: string) => string, + toImage: (str: string) => string, + shortnameToImage: (str: string) => string, + unicodeToImage: (str: string) => string, +};