Merge pull request #32410 from diogofcunha/master

Added hashtag-regex type definitions
This commit is contained in:
Benjamin Lichtman 2019-01-23 10:41:30 -08:00 committed by GitHub
commit ea3fb44481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import hashtagRegex from "hashtag-regex";
hashtagRegex(); // $ExpectType RegExp

7
types/hashtag-regex/index.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
// Type definitions for hashtag-regex 2.0
// Project: https://github.com/mathiasbynens/hashtag-regex
// Definitions by: diogofcunha <https://github.com/diogofcunha>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function createRegExp(): RegExp;
export = createRegExp;

View File

@ -0,0 +1,17 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "hashtag-regex-tests.ts"]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }