diff --git a/types/get-emoji/get-emoji-tests.ts b/types/get-emoji/get-emoji-tests.ts new file mode 100644 index 0000000000..fe196cbb92 --- /dev/null +++ b/types/get-emoji/get-emoji-tests.ts @@ -0,0 +1,7 @@ +import getEmoji, { emojiList } from 'get-emoji'; + +// $ExpectType string +getEmoji('rage'); + +// $ExpectType string[] +emojiList; diff --git a/types/get-emoji/index.d.ts b/types/get-emoji/index.d.ts new file mode 100644 index 0000000000..a596108872 --- /dev/null +++ b/types/get-emoji/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for get-emoji 2.0 +// Project: https://github.com/conorhastings/get-emoji +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default function getEmoji(emojiName: string): string; +export const emojiList: string[]; diff --git a/types/get-emoji/tsconfig.json b/types/get-emoji/tsconfig.json new file mode 100644 index 0000000000..9b947e40e4 --- /dev/null +++ b/types/get-emoji/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "get-emoji-tests.ts" + ] +} diff --git a/types/get-emoji/tslint.json b/types/get-emoji/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/get-emoji/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }