Installation
npm install --save @types/ale-url-parser
Summary
This package contains type definitions for ale-url-parser (https://github.com/msn0/ale-url-parser#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ale-url-parser.
index.d.ts
export interface QueryParams {
[key: string]: any;
}
export interface UrlObject {
/**
* @default 'http'
*/
protocol?: string | undefined;
/**
* @default '''
*/
host?: string | undefined;
/**
* @default []
*/
path?: string[] | undefined;
/**
* @default {}
*/
query?: QueryParams | undefined;
hash?: string | undefined;
}
export interface Options {
/**
* Sorting query params is disabled by default.
* You can define your own sorting method
*/
compareFunction?: ((a: string, b: string) => number) | undefined;
}
/**
* Parse url string into url object.
* @return UrlObject
*/
export function parse(url: string): UrlObject;
/**
* Stringify url object into url string.
* @return string
*/
export function stringify(urlObject: UrlObject, options?: Options): string;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: none
Credits
These definitions were written by Michał Jezierski, and Piotr Błażejewicz.