forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DefinitelyTyped#17067 from odin3/master
Add types for normalize-url
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |