import type { ISlashOptions, Query } from '../model.js'; /** * The current path of the location. * As default slashes are included at the start and end. * @param {Partial} options - The slash options * @returns {string} The current path */ export declare function path(options?: Partial): string; /** * Returns the path without the base path. * @param {Partial} options - The slash options * @returns {string} The path without the base path */ export declare function pathWithoutBasePath(options?: Partial): string; /** * Returns the base path as defined in the tag in the head in a reliable way. * If eg. is defined this function will return "/router-slot/". * * An alternative would be to use regex on document.baseURI, * but that will be unreliable in some cases because it * doesn't use the built in HTMLHyperlinkElementUtils. * * To make this method more performant we could cache the anchor element. * As default it will return the base path with slashes in front and at the end. * @param {Partial} options - The slash options * @returns {string} The base path */ export declare function basePath(options?: Partial): string; /** * Creates an URL using the built in HTMLHyperlinkElementUtils. * An alternative would be to use regex on document.baseURI, * but that will be unreliable in some cases because it * doesn't use the built in HTMLHyperlinkElementUtils. * * As default it will return the base path with slashes in front and at the end. * @param {string} path - The path to resolve relative to the base path * @param {Partial} options - The slash options * @returns {string} The resolved path */ export declare function constructPathWithBasePath(path: string, options?: Partial): string; /** * Removes the start of the path that matches the part. * @param {string} path - The path to strip * @param {string} part - The part to remove from the start * @returns {string} The path without the matching start */ export declare function stripStart(path: string, part: string): string; /** * Returns the query string. * @returns {string} The query string */ export declare function queryString(): string; /** * Returns the params for the current path. * @returns {Query} Params */ export declare function query(): Query; /** * Strips the slash from the start and end of a path. * @param {string} path - The path to strip * @returns {string} The path without leading/trailing slashes */ export declare function stripSlash(path: string): string; /** * Ensures the path starts and ends with a slash * @param {string} path - The path to ensure slashes on * @returns {string} The path with leading and trailing slashes */ export declare function ensureSlash(path: string): string; /** * Makes sure that the start and end slashes are present or not depending on the options. * @param {string} path - The path to slashify * @param {Partial} options - The slash options * @param {boolean} [options.start] - Whether the path should start with a slash * @param {boolean} [options.end] - Whether the path should end with a slash * @returns {string} The slashified path */ export declare function slashify(path: string, { start, end }?: Partial): string; /** * Turns a query string into an object. * @param {string} queryString (example: ("test=123&hejsa=LOL&wuhuu")) * @returns {Query} The parsed query object */ export declare function toQuery(queryString: string): Query; /** * Turns a query object into a string query. * @param {Query} query - The query object to stringify * @returns {string} The query string */ export declare function toQueryString(query: Query): string;