feat: update emoji-regex types (#35224)

This commit is contained in:
Ifiok Jr 2019-05-06 23:57:47 +01:00 committed by Jesse Trinity
parent d17c14a550
commit f41d41d860
6 changed files with 20 additions and 8 deletions

View File

@ -1,3 +1,9 @@
import emojiRegex from "emoji-regex";
import emojiRegex from 'emoji-regex';
import emojiRegexText from 'emoji-regex/text';
import emojiRegexEs2015 from 'emoji-regex/es2015';
import emojiRegexEs2015Text from 'emoji-regex/es2015/text';
emojiRegex(); // $ExpectType RegExp
emojiRegexText(); // $ExpectType RegExp
emojiRegexEs2015(); // $ExpectType RegExp
emojiRegexEs2015Text(); // $ExpectType RegExp

2
types/emoji-regex/es2015/index.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare function createRegExp(): RegExp;
export = createRegExp;

2
types/emoji-regex/es2015/text.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare function createRegExp(): RegExp;
export = createRegExp;

View File

@ -1,6 +1,7 @@
// Type definitions for emoji-regex 7.0
// Type definitions for emoji-regex 8.0
// Project: https://github.com/mathiasbynens/emoji-regex, https://mths.be/emoji-regex
// Definitions by: iKBAHT <https://github.com/iKBAHT>
// Ifiok Jr. <https://github.com/ifiokjr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function createRegExp(): RegExp;

2
types/emoji-regex/text.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare function createRegExp(): RegExp;
export = createRegExp;

View File

@ -2,23 +2,22 @@
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"module": "commonjs",
"lib": [
"es6"
],
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"text.d.ts",
"es2015/index.d.ts",
"es2015/text.d.ts",
"emoji-regex-tests.ts"
]
}