style: lint Route interface (#8822)

This commit is contained in:
Daniel Roe 2022-11-09 10:08:50 +01:00 committed by GitHub
parent 5a32927935
commit aec07f4255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,24 +8,24 @@ import { globalMiddleware } from '#build/middleware'
interface Route {
/** Percentage encoded pathname section of the URL. */
path: string;
path: string
/** The whole location including the `search` and `hash`. */
fullPath: string;
fullPath: string
/** 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: string;
hash: string
/** Name of the matched record */
name: string | null | undefined;
name: string | null | undefined
/** 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
* on the current location.
*/
redirectedFrom: Route | undefined;
redirectedFrom: Route | undefined
/** Merged `meta` properties from all of the matched route records. */
meta: Record<string, any>;
meta: Record<string, any>
}
function getRouteFromPath (fullPath: string | Partial<Route>) {