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