diff --git a/emojione/emojione-tests.ts b/emojione/emojione-tests.ts new file mode 100644 index 0000000000..ea5d04e217 --- /dev/null +++ b/emojione/emojione-tests.ts @@ -0,0 +1,13 @@ +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/index.d.ts b/emojione/index.d.ts new file mode 100644 index 0000000000..48b55e87cd --- /dev/null +++ b/emojione/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for emojione 2.2 +// Project: https://github.com/Ranks/emojione +// Definitions by: Danilo Bargen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace emojione; + +export var sprites: boolean; +export var imagePathPNG: string; +export var imagePathSVG: string; +export var imagePathSVGSprites: string; +export var imageType: 'png' | 'svg'; +export var unicodeAlt: boolean; +export var ascii: boolean; +export var unicodeRegexp: string; +export var cacheBustParam: string; +export function toShort(str: string): string; +export function toImage(str: string): string; +export function shortnameToImage(str: string): string; +export function unicodeToImage(str: string): string; diff --git a/emojione/tsconfig.json b/emojione/tsconfig.json new file mode 100644 index 0000000000..67f76849f1 --- /dev/null +++ b/emojione/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "emojione-tests.ts" + ] +} diff --git a/emojione/tslint.json b/emojione/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/emojione/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }