From: Eduardo San Martin Morote Date: Wed, 23 Dec 2020 11:09:44 +0000 (+0100) Subject: chore: add todos X-Git-Tag: v4.0.2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c88e6db31aee8fc7ce13a64782fa8b6dbea28278;p=thirdparty%2Fvuejs%2Frouter.git chore: add todos --- 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