declare module "ext:core/ops" { export type URLParts = [ href: string, origin: string, protocol: string, username: string, password: string, host: string, hostname: string, port: string, pathname: string, search: string, hash: string, ]; export type URLComponent = | "href" | "protocol" | "username" | "password" | "host" | "hostname" | "port" | "pathname" | "search" | "hash"; export type SearchPair = [name: string, value: string]; export function op_url_parse(args: [input: string, base: string | null]): URLParts | null; // Non-href setters retain the original URL when a component cannot be changed. export function op_url_set(args: [href: string, component: Exclude, value: string]): URLParts; export function op_url_set(args: [href: string, component: URLComponent, value: string]): URLParts | null; export function op_url_search_parse(query: string): SearchPair[]; export function op_url_search_serialize(pairs: readonly SearchPair[]): string; }