]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: add todos
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 23 Dec 2020 11:09:44 +0000 (12:09 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 23 Dec 2020 11:10:04 +0000 (12:10 +0100)
src/router.ts
src/types/index.ts

index 15aa574887d2ade374af5809998ea8a5922710f4..6cf8531f317e3f064c7c3c62fb8354e2640505af 100644 (file)
@@ -522,6 +522,7 @@ export function createRouter(options: RouterOptions): Router {
   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)
   }
 
@@ -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<NavigationFailure | void | undefined> {
     const targetLocation: RouteLocation = (pendingLocation = resolve(to))
index 6c1aa92494d5604f9f370dbd052fbd9882157ed0..b3a5821415306bffed5325e9823cc7a09c8615c4 100644 (file)
@@ -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