From c88e6db31aee8fc7ce13a64782fa8b6dbea28278 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 23 Dec 2020 12:09:44 +0100 Subject: [PATCH] chore: add todos --- src/router.ts | 3 +++ src/types/index.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/router.ts b/src/router.ts index 15aa5748..6cf8531f 100644 --- a/src/router.ts +++ b/src/router.ts @@ -522,6 +522,7 @@ export function createRouter(options: RouterOptions): Router { function locationAsObject( to: RouteLocationRaw | RouteLocationNormalized ): Exclude | RouteLocationNormalized { + // FIXME: does not take into account query params return typeof to === 'string' ? { path: to } : assign({}, to) } @@ -586,7 +587,9 @@ export function createRouter(options: RouterOptions): Router { } function pushWithRedirect( + // TODO: should only be RouteLocation? to: RouteLocationRaw | RouteLocation, + // TODO: add replace here redirectedFrom?: RouteLocation ): Promise { const targetLocation: RouteLocation = (pendingLocation = resolve(to)) diff --git a/src/types/index.ts b/src/types/index.ts index 6c1aa924..b3a58214 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -27,6 +27,7 @@ export type RouteParamsRaw = Record< RouteParamValueRaw | RouteParamValueRaw[] > +// TODO: document, mark as internal and export intermediate types for RouteLocationRaw export interface RouteQueryAndHash { query?: LocationQueryRaw hash?: string -- 2.47.3