Skip to main content

Type Alias: RoutePathExpression

RoutePathExpression = object

Defined in: packages/core/src/router/DynamicRoute.ts:23

Path expression type used for router routes definition.

Properties​

extractParameters()​

extractParameters: (trimmedPath, additionalData) => RouteParams

Defined in: packages/core/src/router/DynamicRoute.ts:37

Override for default method, which takes care of parsing url params from given path. It should return object of key/value pairs which correspond to expected path url params and their values.

Parameters​

trimmedPath​

string

additionalData​
path​

string

query​

RouteParams

Returns​

RouteParams


matcher​

matcher: RegExp

Defined in: packages/core/src/router/DynamicRoute.ts:27

Regular expression used to match current path to the specific route.


toPath()​

toPath: (params) => string

Defined in: packages/core/src/router/DynamicRoute.ts:31

Override for the default toPath which generates valid path from current route and passed route params.

Parameters​

params​

RouteParams

Returns​

string