UNPKG

made-runtime

Version:
79 lines (78 loc) 2.77 kB
import { IEquatable } from "./IEquatable"; /** * Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI. */ export declare class Uri implements IEquatable<Uri> { private _uri; /** * Gets the absolute path of the URI. * @returns {string} A string containing the absolute path to the resource. */ absolutePath: string; /** * Gets the absolute URI. * @returns {string} A string containing the entire URI. */ absoluteUri: string; /** * Gets the Domain Name System (DNS) host name or IP address and the port number for a server. * @returns {string} A string containing the authority component of the URI. */ authority: string; /** * Gets the escaped URI fragment. * @returns {string} A string that contains any URI fragment information. */ fragment: string; /** * Gets the host component of the URI. * @returns {string} A string that contains the host name. This is usually the DNS host name or IP address of the server. */ host: string; /** * Gets a value indicating whether the URI is absolute. * @returns {boolean} True if the URI is absolute; otherwise, false. */ isAbsoluteUri: boolean; /** * Gets a value indicating whether the URI is a file URI. * @returns {boolean} True if the URI is a file URI; otherwise, false. */ isFileUri: boolean; /** * Gets any query information included in the specified URI. * @returns {string} A string containing the URI query. */ query: string; /** * Gets the query information as their individual parts in a dictionary. * @returns {[key: string]: string} A dictionary containing the query parts. */ queryParts: { [key: string]: string; }; /** * Gets the scheme name for this URI. * @returns {string} A string that contains the scheme name. */ scheme: string; /** * Gets an array containing the path segments that make up the specified URI. * @returns {string[]} An array of strings that contains the path segments. */ segments: string[]; /** * Initializes a new instance of the Uri class using a URI value represented by a string. * @param {string} uri - A string that contains a valid URI. */ constructor(uri: string); /** * Retrieves a query part from the URI based on the specified key. * @param {string} key - The key of the query part to retrieve. * @returns {string} A string that contains the value of the query part. */ getQueryValue(key: string): string; private parseQueryParts; toString(): string; equals(other: Uri): boolean; }