diff --git a/types/github-username-regex/github-username-regex-tests.ts b/types/github-username-regex/github-username-regex-tests.ts new file mode 100644 index 0000000000..d829752776 --- /dev/null +++ b/types/github-username-regex/github-username-regex-tests.ts @@ -0,0 +1,4 @@ +import githubUsernameRegex = require("github-username-regex"); + +const githubUsernameRegexString: string = githubUsernameRegex.source; +const valid: boolean = githubUsernameRegex.test("abc-123"); diff --git a/types/github-username-regex/index.d.ts b/types/github-username-regex/index.d.ts new file mode 100644 index 0000000000..59b3d703f7 --- /dev/null +++ b/types/github-username-regex/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for github-username-regex 1.0 +// Project: https://github.com/shinnn/github-username-regex +// Definitions by: BehindTheMath +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const githubUsernameRegex: RegExp; +export = githubUsernameRegex; diff --git a/types/github-username-regex/tsconfig.json b/types/github-username-regex/tsconfig.json new file mode 100644 index 0000000000..4a30cf07ad --- /dev/null +++ b/types/github-username-regex/tsconfig.json @@ -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", + "github-username-regex-tests.ts" + ] +} diff --git a/types/github-username-regex/tslint.json b/types/github-username-regex/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/github-username-regex/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }