Add types for has-emoji

This commit is contained in:
Dimitri Benin
2018-12-10 23:21:51 +01:00
parent fda699244c
commit a10c1b112f
4 changed files with 38 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
import hasEmoji = require('has-emoji');
// $ExpectType boolean
hasEmoji('Unicorn 🦄');
// $ExpectType boolean
hasEmoji('Cat');
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for has-emoji 1.0
// Project: https://github.com/sindresorhus/has-emoji#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = hasEmoji;
declare function hasEmoji(candidate: string): boolean;
+23
View File
@@ -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",
"has-emoji-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }