Files
SnowLuma/.pnpm-store/v11/files/e6/80541ad6c502d118c65b2ed85e5d770b62e12e00a3ca4abd58db0370d2b39bdd16e73eb04302c109448670c733eeff9ca642c7c13f30b9694ae698bb2fc72f
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

52 lines
1.4 KiB
Plaintext

import type { ParsedHistoryState } from '@tanstack/history'
import type { AnySchema } from './validators'
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
}