mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
[github-username-regex] Add definitions (#20665)
* [github-username-regex] Add definitions * [github-username-regex] Change to match CommonJS export format
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import githubUsernameRegex = require("github-username-regex");
|
||||
|
||||
const githubUsernameRegexString: string = githubUsernameRegex.source;
|
||||
const valid: boolean = githubUsernameRegex.test("abc-123");
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// Type definitions for github-username-regex 1.0
|
||||
// Project: https://github.com/shinnn/github-username-regex
|
||||
// Definitions by: BehindTheMath <https://github.com/BehindTheMath>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare const githubUsernameRegex: RegExp;
|
||||
export = githubUsernameRegex;
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user