Merge pull request #13293 from dbrgn/emojione

Add emojione type declarations
This commit is contained in:
Andy
2016-12-14 10:48:31 -08:00
committed by GitHub
4 changed files with 53 additions and 0 deletions
+13
View File
@@ -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');
+20
View File
@@ -0,0 +1,20 @@
// Type definitions for emojione 2.2
// Project: https://github.com/Ranks/emojione
// Definitions by: Danilo Bargen <https://github.com/dbrgn/>
// 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;
+19
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "../tslint.json" }