Skip to content

RouterResolve

Resolves a URL to a route object.

Type parameters

ParameterType
TSourceName

Parameters

If source is Url

ParameterType
sourceUrl
optionsRouterResolveOptions | undefined

If source is TSource

ParameterType
sourceTSource
paramsRouterResolveArgs
optionsRouterResolveOptions | undefined

RouterResolveArgs

If source is Url, expected type for params is never. Else when source is TSource, router will require params for required path/query params. If no path/query params on route or all params are optional, the argument will be optional.

RouterResolveOptions

ts
{
  query?: QuerySource,
  hash?: string,
}

QuerySource

Returns

Url