| 1 |
type FastUri = typeof fastUri |
| 2 |
|
| 3 |
declare namespace fastUri { |
| 4 |
export interface URIComponent { |
| 5 |
scheme?: string; |
| 6 |
userinfo?: string; |
| 7 |
host?: string; |
| 8 |
port?: number | string; |
| 9 |
path?: string; |
| 10 |
query?: string; |
| 11 |
fragment?: string; |
| 12 |
reference?: string; |
| 13 |
nid?: string; |
| 14 |
nss?: string; |
| 15 |
resourceName?: string; |
| 16 |
secure?: boolean; |
| 17 |
uuid?: string; |
| 18 |
error?: string; |
| 19 |
} |
| 20 |
export interface Options { |
| 21 |
scheme?: string; |
| 22 |
reference?: string; |
| 23 |
unicodeSupport?: boolean; |
| 24 |
domainHost?: boolean; |
| 25 |
absolutePath?: boolean; |
| 26 |
tolerant?: boolean; |
| 27 |
skipEscape?: boolean; |
| 28 |
nid?: string; |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* @deprecated Use Options instead |
| 33 |
*/ |
| 34 |
export type options = Options |
| 35 |
/** |
| 36 |
* @deprecated Use URIComponent instead |
| 37 |
*/ |
| 38 |
export type URIComponents = URIComponent |
| 39 |
|
| 40 |
export function normalize (uri: string, opts?: Options): string |
| 41 |
export function normalize (uri: URIComponent, opts?: Options): URIComponent |
| 42 |
export function normalize (uri: any, opts?: Options): any |
| 43 |
|
| 44 |
export function resolve (baseURI: string, relativeURI: string, options?: Options): string |
| 45 |
|
| 46 |
export function resolveComponent (base: URIComponent, relative: URIComponent, options?: Options, skipNormalization?: boolean): URIComponent |
| 47 |
|
| 48 |
export function parse (uri: string, opts?: Options): URIComponent |
| 49 |
|
| 50 |
export function serialize (component: URIComponent, opts?: Options): string |
| 51 |
|
| 52 |
export function equal (uriA: string, uriB: string): boolean |
| 53 |
|
| 54 |
export function resolve (base: string, path: string): string |
| 55 |
|
| 56 |
export const fastUri: FastUri |
| 57 |
export { fastUri as default } |
| 58 |
} |
| 59 |
|
| 60 |
export = fastUri |