diff --git a/types/hashtag-regex/hashtag-regex-tests.ts b/types/hashtag-regex/hashtag-regex-tests.ts new file mode 100644 index 0000000000..d0c9e3417d --- /dev/null +++ b/types/hashtag-regex/hashtag-regex-tests.ts @@ -0,0 +1,3 @@ +import hashtagRegex from "hashtag-regex"; + +hashtagRegex(); // $ExpectType RegExp diff --git a/types/hashtag-regex/index.d.ts b/types/hashtag-regex/index.d.ts new file mode 100644 index 0000000000..3540ce867b --- /dev/null +++ b/types/hashtag-regex/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for hashtag-regex 2.0 +// Project: https://github.com/mathiasbynens/hashtag-regex +// Definitions by: diogofcunha +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function createRegExp(): RegExp; +export = createRegExp; diff --git a/types/hashtag-regex/tsconfig.json b/types/hashtag-regex/tsconfig.json new file mode 100644 index 0000000000..5946da8371 --- /dev/null +++ b/types/hashtag-regex/tsconfig.json @@ -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"] +} diff --git a/types/hashtag-regex/tslint.json b/types/hashtag-regex/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hashtag-regex/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }