mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 21:47:35 +00:00
Add typings for emoji-strip (#39272)
* generate types/emoji-strip dir with dts-gen * finish emoji-strip/index.d.ts * finish emoji-strip tests * Fix version * More fixes for emoij-strip. * fix require
This commit is contained in:
parent
e47ab14b90
commit
2f441237fc
3
types/emoji-strip/emoji-strip-tests.ts
Normal file
3
types/emoji-strip/emoji-strip-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import emojiStrip = require('emoji-strip');
|
||||
|
||||
const text: string = emojiStrip('Smile emoji: 😀');
|
||||
15
types/emoji-strip/index.d.ts
vendored
Normal file
15
types/emoji-strip/index.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
// Type definitions for emoji-strip 1.0
|
||||
// Project: https://github.com/nizaroni/emoji-strip
|
||||
// Definitions by: Gary King <https://github.com/garyking>
|
||||
// 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;
|
||||
24
types/emoji-strip/tsconfig.json
Normal file
24
types/emoji-strip/tsconfig.json
Normal file
@ -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"
|
||||
]
|
||||
}
|
||||
1
types/emoji-strip/tslint.json
Normal file
1
types/emoji-strip/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user