1 export interface URIComponents {
5 port?: number | string;
12 export interface URIOptions {
16 absolutePath?: boolean;
18 unicodeSupport?: boolean;
21 export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
23 parse(components: ParentComponents, options: Options): Components;
24 serialize(components: Components, options: Options): ParentComponents;
25 unicodeSupport?: boolean;
27 absolutePath?: boolean;
29 export interface URIRegExps {
34 NOT_PATH_NOSCHEME: RegExp;
44 export declare const SCHEMES: {
45 [scheme: string]: URISchemeHandler;
47 export declare function pctEncChar(chr: string): string;
48 export declare function pctDecChars(str: string): string;
49 export declare function parse(uriString: string, options?: URIOptions): URIComponents;
50 export declare function removeDotSegments(input: string): string;
51 export declare function serialize(components: URIComponents, options?: URIOptions): string;
52 export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
53 export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
54 export declare function normalize(uri: string, options?: URIOptions): string;
55 export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
56 export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
57 export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
58 export declare function escapeComponent(str: string, options?: URIOptions): string;
59 export declare function unescapeComponent(str: string, options?: URIOptions): string;