import { IURLExtended } from './types'; import URLSearchParams from './url-search-params'; export default class implements IURLExtended { private url; constructor(url: string); get protocol(): string; set protocol(value: string); get username(): string; set username(value: string); get password(): string; set password(value: string); get hostname(): string; set hostname(value: string); get host(): string; set host(value: string); get origin(): string; get port(): string; set port(value: string); get pathname(): string; set pathname(value: string); /** * The query string component of the URL, including the preceding `?` character. * See also: https://developer.mozilla.org/en-US/docs/Web/API/URL/search */ get search(): string; set search(value: string); /** * Parsed query string parameters, as a `URLSearchParams` object. * See also: https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams */ get searchParams(): URLSearchParams; /** * Parsed parameter string from the url. These are `;` separated key/values appearing in the URL * path, before the query string. */ get parameters(): URLSearchParams; /** * Check if the URL has a parameter string * @returns true iff `;` occurs in the URL path before a `?`. */ hasParameterString(): boolean; /** * URL hash or fragment component. * See also: https://developer.mozilla.org/en-US/docs/Web/API/URL/hash */ get hash(): string; set hash(value: string); get href(): string; set href(value: string); /** * Returns the url (post parsing). * See also: https://developer.mozilla.org/en-US/docs/Web/API/URL/toString */ toString(): string; /** * JSONified URL (== toString) * See also: https://developer.mozilla.org/en-US/docs/Web/API/URL/toJSON */ toJSON(): string; /** * Get parsed domainInfo from the hostname. * @returns parsed domain, from tldts `parse` method. */ get domainInfo(): import("tldts-core").IResult; /** * Returns true iff the hostname of this url is an IP address. False otherwise. */ get hostIsIp(): boolean | null; /** * Returns the hostname of the URL after parsing by tldts. This includes some error correction. */ get domain(): string; /** * Get eTLD+1 of the hostname. */ get generalDomain(): string; /** * Legacy attribute for `pathname`. */ get path(): string; /** * Scheme = protocol without a trailing ':'. */ get scheme(): string; get slashes(): string; /** * Check if the hostname of the URL is valid, i.e. * * it is an IP address, or * * it is a valid hostname with a known public suffix. * @returns true if host is valid, otherwise false. */ isValidHost(): boolean; /** * Non-standard params extractor. * * Returns search params from parameter string and query params with more aggessive extraction * than the standard URL implementation. Extra extraction features are: * * `;` separated parameters - used by multi trackers * @returns URLSearchParams */ extractKeyValues(): URLSearchParams; }