Skip to content
Перевод синхронизирован с документацией от , хэш коммита 0d8d997.

API Documentation / RouterMatcher

Interface: RouterMatcher ​

Internal RouterMatcher

Properties ​

addRoute ​

• addRoute: (record: RouteRecordRaw, parent?: RouteRecordMatcher) => () => void

Type declaration ​

▸ (record, parent?): () => void

Parameters ​
NameType
recordRouteRecordRaw
parent?RouteRecordMatcher
Returns ​

fn

▸ (): void

Returns ​

void


clearRoutes ​

• clearRoutes: () => void

Type declaration ​

▸ (): void

Returns ​

void


getRecordMatcher ​

• getRecordMatcher: (name: NonNullable<RouteRecordNameGeneric>) => undefined | RouteRecordMatcher

Type declaration ​

▸ (name): undefined | RouteRecordMatcher

Parameters ​
NameType
nameNonNullable<RouteRecordNameGeneric>
Returns ​

undefined | RouteRecordMatcher


getRoutes ​

• getRoutes: () => RouteRecordMatcher[]

Type declaration ​

▸ (): RouteRecordMatcher[]

Returns ​

RouteRecordMatcher[]


resolve ​

• resolve: (location: MatcherLocationRaw, currentLocation: MatcherLocation) => MatcherLocation

Resolves a location. Gives access to the route record that corresponds to the actual path as well as filling the corresponding params objects

Param

MatcherLocationRaw to resolve to a url

Param

MatcherLocation of the current location

Type declaration ​

▸ (location, currentLocation): MatcherLocation

Resolves a location. Gives access to the route record that corresponds to the actual path as well as filling the corresponding params objects

Parameters ​
NameTypeDescription
locationMatcherLocationRawMatcherLocationRaw to resolve to a url
currentLocationMatcherLocationMatcherLocation of the current location
Returns ​

MatcherLocation

Methods ​

removeRoute ​

▸ removeRoute(matcher): void

Parameters ​

NameType
matcherRouteRecordMatcher

Returns ​

void

▸ removeRoute(name): void

Parameters ​

NameType
nameNonNullable<RouteRecordNameGeneric>

Returns ​

void

Released under the MIT License.