Merge pull request #31173 from BendingBender/humanize-url

Add types for humanize-url
This commit is contained in:
Andrew Casey
2018-12-07 17:22:04 -08:00
committed by GitHub
4 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
import humanizeUrl = require('humanize-url');
// $ExpectType string
humanizeUrl('https://www.sindresorhus.com/');

8
types/humanize-url/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for humanize-url 2.0
// Project: https://github.com/sindresorhus/humanize-url#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = humanizeUrl;
declare function humanizeUrl(url: string): string;

View File

@@ -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",
"humanize-url-tests.ts"
]
}

View File

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