[is-url-superb]: Add initial type definition (#18531)

* [is-url-superb]: Add initial type definition

* [is-url-superb] Remove namespace declaration
This commit is contained in:
Michael Strobel
2017-08-02 11:21:19 -07:00
committed by Sheetal Nandi
parent 24c1979c3b
commit fc7a45f9ea
4 changed files with 36 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for is-url-superb 2.0
// Project: https://github.com/sindresorhus/is-url-superb
// Definitions by: Michael Strobel <https://github.com/kryops>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = isUrl;
declare function isUrl(str: string): boolean;
@@ -0,0 +1,5 @@
import isUrl = require('is-url-superb');
const url1: boolean = isUrl('http://todomvc.com');
const url2: boolean = isUrl('//todomvc.com');
const url3: boolean = isUrl('unicorn');
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"is-url-superb-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }