UNPKG

@tempots/ui

Version:

Provides a higher level of renderables to help fast development with Tempo.

43 lines (42 loc) 1.22 kB
/** * Represents the data for a location. * * @public */ export type LocationData = { /** * The pathname of the location. */ readonly pathname: string; /** * The search parameters of the location. */ readonly search: Record<string, string>; /** * The hash of the location. */ readonly hash?: string; }; /** * Compares two location objects and returns true if they are equal, false otherwise. * @param a - The first location object to compare. * @param b - The second location object to compare. * @returns True if the location objects are equal, false otherwise. * @public */ export declare const areLocationsEqual: (a: LocationData, b: LocationData) => boolean; /** * Converts a URL string into a LocationData object. * @param url - The URL string to convert. * @returns The LocationData object representing the URL. * @public */ export declare const locationFromURL: (url: string, baseUrl?: string) => LocationData; /** * Returns the full URL based on the provided location data. * * @param location - The location data object. * @returns The full URL string. * @public */ export declare const urlFromLocation: (location: LocationData) => string;