Skip to content

vue-router / RouteLocationTyped

RouteLocationTyped<RouteMap, Name>

Helper to generate a type safe version of the RouteLocation type.

Extends

Extended by

Type Parameters

RouteMap

RouteMap extends RouteMapGeneric

Name

Name extends keyof RouteMap

Properties

fullPath

ts
fullPath: string;

The whole location including the search and hash. This string is percentage encoded.

Inherited from

RouteLocationGeneric.fullPath


hash

ts
hash: string;

Hash of the current location. If present, starts with a #.

Inherited from

RouteLocationGeneric.hash


matched

ts
matched: RouteRecordNormalized[];

Array of RouteRecord containing components as they were passed when adding records. It can also contain redirect records. This can't be used directly. This property is non-enumerable.

Inherited from

RouteLocationGeneric.matched


meta

ts
meta: RouteMeta;

Merged meta properties from all the matched route records.

Inherited from

RouteLocationGeneric.meta


name

ts
name: Extract<Name, string | symbol>;

Name of the matched record

Overrides

RouteLocationGeneric.name


params

ts
params: RouteMap[Name]["params"];

Object of decoded params extracted from the path.

Overrides

RouteLocationGeneric.params


path

ts
path: string;

Percentage encoded pathname section of the URL.

Inherited from

RouteLocationGeneric.path


query

ts
query: LocationQuery;

Object representation of the search property of the current location.

Inherited from

RouteLocationGeneric.query


redirectedFrom

ts
redirectedFrom: undefined | RouteLocationGeneric;

Contains the location we were initially trying to access before ending up on the current location.

Inherited from

RouteLocationGeneric.redirectedFrom

Released under the MIT License.