export declare class URLSearchParams { _entries: [string, string][]; constructor(init?: string | Record | [string, string][] | URLSearchParams); get(name: string): string | null; getAll(name: string): string[]; set(name: string, value: string): void; has(name: string, value?: string): boolean; /** * The `value` argument is not optional decoration: ignoring it silently — as this did — turns * `delete('a', '1')` on `?a=1&a=2` into "delete every a", and with the update steps in place * that wipes the whole query out of `href` instead of leaving `?a=2`. */ delete(name: string, value?: string): void; append(name: string, value: string): void; sort(): void; toString(): string; forEach(callback: (value: string, key: string, parent: URLSearchParams) => void): void; entries(): IterableIterator<[string, string]>; keys(): IterableIterator; values(): IterableIterator; [Symbol.iterator](): IterableIterator<[string, string]>; get size(): number; } export declare class URL { #private; constructor(url: string | URL, base?: string | URL); get protocol(): string; get hostname(): string; get port(): string; get host(): string; get pathname(): string; get search(): string; /** * Replace the whole query. * * A setter and not merely a getter: assigning `url.search` is how Node code sets a query in * one go, and without it the obvious workaround for the missing write-back — building a * string and assigning it — threw `TypeError: setting getter-only property`, leaving no way * to put a query on a URL at all. * * The existing `searchParams` object is refilled in place rather than replaced, because the * spec makes it a stable identity: code that captured `const p = url.searchParams` before * the assignment must still see the new values. */ set search(value: string); get hash(): string; get origin(): string; get username(): string; get password(): string; get href(): string; get searchParams(): URLSearchParams; toString(): string; toJSON(): string; static _objectURLPaths: Map; static _objectURLCounter: number; static createObjectURL(blob: { _tmpPath?: string; type?: string; size?: number; }): string; static revokeObjectURL(url: string): void; } export interface UrlObject { protocol?: string | null; slashes?: boolean | null; auth?: string | null; host?: string | null; port?: string | null; hostname?: string | null; hash?: string | null; search?: string | null; query?: string | Record | null; pathname?: string | null; path?: string | null; href?: string; } export interface Url extends UrlObject { href: string; } export declare function parse(urlString: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url; export declare function format(urlObject: UrlObject | string | URL): string; export declare function resolve(from: string, to: string): string; /** * @param options.windows read the URL as naming a win32 path — Node's own escape hatch * (`refs/node/lib/internal/url.js`), and the only way to ask for the non-host answer from * a POSIX runner. Defaults to the host. */ export declare function fileURLToPath(url: string | URL, options?: { windows?: boolean; }): string; /** * @param options.windows treat `filepath` as a win32 path even where the host is not — Node's * own escape hatch (`refs/node/lib/internal/url.js`), and how the win32 behaviour is checked * from the Linux runner CI actually has (#1143). * * Not yet at Node parity: Node runs `path.win32.resolve()` first, so a RELATIVE path gets the * current drive. Here a relative path is still joined to the CWD with `/`. Recorded in * `status/open-todos.md` rather than half-done. */ export declare function pathToFileURL(filepath: string, options?: { windows?: boolean; }): URL; export declare function domainToASCII(domain: string): string; export declare function domainToUnicode(domain: string): string; declare const _default: { URL: typeof URL; URLSearchParams: typeof URLSearchParams; parse: typeof parse; format: typeof format; resolve: typeof resolve; fileURLToPath: typeof fileURLToPath; pathToFileURL: typeof pathToFileURL; domainToASCII: typeof domainToASCII; domainToUnicode: typeof domainToUnicode; }; export default _default;