Files
SnowLuma/.pnpm-store/v11/files/ab/8a28c5dc7efb306346f34d05db1bff4a1a1b00ed026de0ebe29bbbd98238c58b5b0047f1aecf382778e71114c19bceab171d387fa654b2f860a5e79e46b4c7
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

51 lines
1.5 KiB
Plaintext

import { ParsedHistoryState } from '@tanstack/history';
import { AnySchema } from './validators.js';
export interface ParsedLocation<TSearchObj extends AnySchema = {}> {
/**
* The full path of the location, including pathname, search, and hash.
* Does not include the origin. Is the equivalent of calling
* `url.replace(url.origin, '')`
*/
href: string;
/**
* @description The pathname of the location, including the leading slash.
*/
pathname: string;
/**
* The parsed search parameters of the location in object form.
*/
search: TSearchObj;
/**
* The search string of the location, including the leading question mark.
*/
searchStr: string;
/**
* The in-memory state of the location as it *may* exist in the browser's history.
*/
state: ParsedHistoryState;
/**
* The hash of the location, excluding the leading hash character.
* (e.g., '123' instead of '#123')
*/
hash: string;
/**
* The masked location of the location.
*/
maskedLocation?: ParsedLocation<TSearchObj>;
/**
* Whether to unmask the location on reload.
*/
unmaskOnReload?: boolean;
/**
* @private
* @description The public href of the location.
* If a rewrite is applied, the `href` property will be the rewritten URL.
*/
publicHref: string;
/**
* @private
* @description Whether the publicHref is external (different origin from rewrite).
*/
external: boolean;
}