diff --git a/types/emoji-strip/emoji-strip-tests.ts b/types/emoji-strip/emoji-strip-tests.ts new file mode 100644 index 0000000000..53056b1c81 --- /dev/null +++ b/types/emoji-strip/emoji-strip-tests.ts @@ -0,0 +1,3 @@ +import emojiStrip = require('emoji-strip'); + +const text: string = emojiStrip('Smile emoji: 😀'); diff --git a/types/emoji-strip/index.d.ts b/types/emoji-strip/index.d.ts new file mode 100644 index 0000000000..dd647cc8b9 --- /dev/null +++ b/types/emoji-strip/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for emoji-strip 1.0 +// Project: https://github.com/nizaroni/emoji-strip +// Definitions by: Gary King +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +/** + * Strip emojis from text. + * + * @param text The text from which to strip the emojis. + * @returns The text, with emojis removed. + */ +declare function emojiStrip(text: string): string; + +export = emojiStrip; diff --git a/types/emoji-strip/tsconfig.json b/types/emoji-strip/tsconfig.json new file mode 100644 index 0000000000..56caff4da9 --- /dev/null +++ b/types/emoji-strip/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "emoji-strip-tests.ts" + ] +} diff --git a/types/emoji-strip/tslint.json b/types/emoji-strip/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/emoji-strip/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }