File tree Expand file tree Collapse file tree 5 files changed +2144
-22
lines changed
Expand file tree Collapse file tree 5 files changed +2144
-22
lines changed Original file line number Diff line number Diff line change 1+ import parseUrl = require( "./index" ) ;
2+
3+ export type ParsedUrl = parseUrl . ParsedUrl ;
4+ export type NormalizeOptions = parseUrl . NormalizeOptions ;
5+ export type ParsingError = parseUrl . ParsingError ;
6+
7+ export default parseUrl ;
Original file line number Diff line number Diff line change 1- declare interface ParsedUrl {
2- protocols : string [ ] ;
3- protocol : string ;
4- port ?: string ;
5- resource : string ;
6- user : string ;
7- pathname : string ;
8- hash : string ;
9- search : string ;
10- href : string ;
11- query : {
12- [ key : string ] : any ;
13- }
1+ import parsePath = require ( "parse-path" ) ;
2+ import normalizeUrl = require ( "normalize-url" ) ;
3+
4+ declare namespace parseUrl {
5+ const MAX_INPUT_LENGTH : 2048 ;
6+
7+ type NormalizeOptions = normalizeUrl . Options ;
8+
9+ type ParsedUrl = parsePath . ParsedPath ;
10+
11+ interface ParsingError extends Error {
12+ readonly subject_url : string ;
13+ }
1414}
1515
16- declare function parseUrl ( url : string , normalize ?: boolean | Object ) : ParsedUrl ;
16+ declare function parseUrl (
17+ url : string ,
18+ normalize ?: boolean | parseUrl . NormalizeOptions
19+ ) : parseUrl . ParsedUrl ;
1720
18- export = parseUrl
21+ export = parseUrl ;
You can’t perform that action at this time.
0 commit comments