Skip to content

vue-router / RouteLocationAsPathTyped

RouteLocationAsPathTyped<RouteMap, Name> ​

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

Extends ​

Type Parameters ​

RouteMap ​

RouteMap extends { [K in keyof RouteMap]: RouteRecordInfoGeneric } = RouteMapGeneric

Name ​

Name extends keyof RouteMap = keyof RouteMap

Properties ​

force? ​

ts
optional force?: boolean;

Triggers the navigation even if the location is the same as the current one. Note this will also add a new entry to the history unless replace: true is passed.

Inherited from ​

RouteLocationAsPathGeneric.force


hash? ​

ts
optional hash?: string;

Inherited from ​

RouteLocationAsPathGeneric.hash


path ​

ts
path: _LiteralUnion<RouteMap[Name]["path"]>;

Percentage encoded pathname section of the URL.

Overrides ​

RouteLocationAsPathGeneric.path


query? ​

ts
optional query?: LocationQueryRaw;

Inherited from ​

RouteLocationAsPathGeneric.query


replace? ​

ts
optional replace?: boolean;

Replace the entry in the history instead of pushing a new entry

Inherited from ​

RouteLocationAsPathGeneric.replace


state? ​

ts
optional state?: HistoryState;

State to save using the History API. This cannot contain any reactive values and some primitives like Symbols are forbidden. More info at https://developer.mozilla.org/en-US/docs/Web/API/History/state

Inherited from ​

RouteLocationAsPathGeneric.state

Released under the MIT License.