mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 05:20:24 +08:00
Merge pull request #17067 from odin3/master
Add types for normalize-url
This commit is contained in:
21
types/normalize-url/index.d.ts
vendored
Normal file
21
types/normalize-url/index.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// Type definitions for normalize-url 1.9
|
||||
// Project: https://github.com/sindresorhus/normalize-url
|
||||
// Definitions by: odin3 <https://github.com/odin3>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace NormalizeUrl {
|
||||
interface NormalizeUrlArgs {
|
||||
normalizeProtocol?: boolean;
|
||||
normalizeHttps?: boolean;
|
||||
stripFragment?: boolean;
|
||||
stripWWW?: boolean;
|
||||
removeQueryParameters?: string[];
|
||||
removeTrailingSlash?: boolean;
|
||||
removeDirectoryIndex?: RegExp[];
|
||||
}
|
||||
|
||||
// tslint:disable-next-line align
|
||||
function normalizeUrl(url: string, args?: NormalizeUrlArgs): string;
|
||||
}
|
||||
|
||||
export = NormalizeUrl.normalizeUrl;
|
||||
21
types/normalize-url/tsconfig.json
Normal file
21
types/normalize-url/tsconfig.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts"
|
||||
]
|
||||
}
|
||||
7
types/normalize-url/tslint.json
Normal file
7
types/normalize-url/tslint.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// This package uses the Function type, and it will take effort to fix.
|
||||
"ban-types": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user