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

@ -7,25 +7,25 @@ import { callWithNuxt } from '../nuxt'
import { globalMiddleware } from '#build/middleware' 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>) {