mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
style: lint Route
interface (#8822)
This commit is contained in:
parent
5a32927935
commit
aec07f4255
@ -8,24 +8,24 @@ import { globalMiddleware } from '#build/middleware'
|
|||||||
|
|
||||||
interface Route {
|
interface Route {
|
||||||
/** Percentage encoded pathname section of the URL. */
|
/** Percentage encoded pathname section of the URL. */
|
||||||
path: string;
|
path: string
|
||||||
/** The whole location including the `search` and `hash`. */
|
/** The whole location including the `search` and `hash`. */
|
||||||
fullPath: string;
|
fullPath: string
|
||||||
/** Object representation of the `search` property of the current location. */
|
/** Object representation of the `search` property of the current location. */
|
||||||
query: Record<string, any>;
|
query: Record<string, any>
|
||||||
/** Hash of the current location. If present, starts with a `#`. */
|
/** Hash of the current location. If present, starts with a `#`. */
|
||||||
hash: string;
|
hash: string
|
||||||
/** Name of the matched record */
|
/** Name of the matched record */
|
||||||
name: string | null | undefined;
|
name: string | null | undefined
|
||||||
/** Object of decoded params extracted from the `path`. */
|
/** Object of decoded params extracted from the `path`. */
|
||||||
params: Record<string, any>;
|
params: Record<string, any>
|
||||||
/**
|
/**
|
||||||
* The location we were initially trying to access before ending up
|
* The location we were initially trying to access before ending up
|
||||||
* on the current location.
|
* on the current location.
|
||||||
*/
|
*/
|
||||||
redirectedFrom: Route | undefined;
|
redirectedFrom: Route | undefined
|
||||||
/** Merged `meta` properties from all of the matched route records. */
|
/** Merged `meta` properties from all of the matched route records. */
|
||||||
meta: Record<string, any>;
|
meta: Record<string, any>
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRouteFromPath (fullPath: string | Partial<Route>) {
|
function getRouteFromPath (fullPath: string | Partial<Route>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user