function locationAsObject(
to: RouteLocationRaw | RouteLocationNormalized
): Exclude<RouteLocationRaw, string> | RouteLocationNormalized {
+ // FIXME: does not take into account query params
return typeof to === 'string' ? { path: to } : assign({}, to)
}
}
function pushWithRedirect(
+ // TODO: should only be RouteLocation?
to: RouteLocationRaw | RouteLocation,
+ // TODO: add replace here
redirectedFrom?: RouteLocation
): Promise<NavigationFailure | void | undefined> {
const targetLocation: RouteLocation = (pendingLocation = resolve(to))
RouteParamValueRaw | RouteParamValueRaw[]
>
+// TODO: document, mark as internal and export intermediate types for RouteLocationRaw
export interface RouteQueryAndHash {
query?: LocationQueryRaw
hash?: string