Skip to content

Commit

Permalink
fix: location query type signature compatibility (#38)
Browse files Browse the repository at this point in the history
* fix: location query type signature compatibility

* chore(deps): update `playwright` and `vite-test-utils`
  • Loading branch information
BobbieGoede authored Sep 17, 2023
1 parent 767cbf0 commit ad7f3ab
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 28 deletions.
6 changes: 3 additions & 3 deletions examples/vue-i18n-v8-vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"@vue/runtime-dom": "3.2.22",
"typescript": "4.5.4",
"unplugin-vue2-script-setup": "0.7.1",
"playwright": "1.37.1",
"playwright": "1.38.0",
"vite": "2.9.12",
"vite-test-utils": "0.5.2",
"vite-test-utils": "0.6.0",
"vitest": "0.23.2",
"vite-plugin-vue2": "2.0.2",
"vue-template-compiler": "2.6.14",
"vue-tsc": "0.30.1"
}
}
}
6 changes: 3 additions & 3 deletions examples/vue-i18n-v9-vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"@types/node": "16.11.17",
"@vitejs/plugin-vue": "2.0.1",
"typescript": "4.5.4",
"playwright": "1.37.1",
"playwright": "1.38.0",
"vite": "2.9.12",
"vite-test-utils": "0.5.2",
"vite-test-utils": "0.6.0",
"vitest": "0.23.2",
"vue-tsc": "0.30.1"
}
}
}
6 changes: 3 additions & 3 deletions examples/vue-router-v3-vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"@vue/runtime-dom": "3.2.22",
"typescript": "4.5.4",
"unplugin-vue2-script-setup": "0.7.1",
"playwright": "1.37.1",
"playwright": "1.38.0",
"vite": "2.9.12",
"vite-test-utils": "0.5.2",
"vite-test-utils": "0.6.0",
"vitest": "0.23.2",
"vite-plugin-vue2": "2.0.2",
"vue-template-compiler": "2.6.14",
"vue-tsc": "0.30.1"
}
}
}
6 changes: 3 additions & 3 deletions examples/vue-router-v36-vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"@vue/runtime-dom": "3.2.22",
"typescript": "4.5.4",
"unplugin-vue2-script-setup": "0.7.1",
"playwright": "1.37.1",
"playwright": "1.38.0",
"vite": "2.9.12",
"vite-test-utils": "0.5.2",
"vite-test-utils": "0.6.0",
"vitest": "0.23.2",
"vite-plugin-vue2": "2.0.2",
"vue-template-compiler": "2.7.10",
"vue-tsc": "0.30.1"
}
}
}
6 changes: 3 additions & 3 deletions examples/vue-router-v4-vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"@types/node": "16.11.17",
"@vitejs/plugin-vue": "2.0.1",
"typescript": "4.5.4",
"playwright": "1.37.1",
"playwright": "1.38.0",
"vite": "2.9.12",
"vite-test-utils": "0.5.2",
"vite-test-utils": "0.6.0",
"vitest": "0.23.2",
"vue-tsc": "0.30.1"
}
}
}
27 changes: 14 additions & 13 deletions packages/vue-router-bridge/lib/v4/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { RouteLocationNormalizedLoaded, Router, RouteRecord, RouteMeta, NavigationGuard } from 'vue-router'
import type { RouteLocationNormalizedLoaded, Router, RouteRecord, RouteMeta, NavigationGuard, RouteLocationRaw, LocationQuery, RouteParams } from 'vue-router'

/**
* shim vue-router@3 typings
Expand All @@ -14,22 +14,22 @@ declare interface VueRouter {
beforeEach(guard: NavigationGuard): Function
beforeResolve(guard: NavigationGuard): Function
afterEach(hook: (to: Route, from: Route) => any): Function
push(location: RawLocation): Promise<Route>
push(location: RawLocation, onComplete?: Function, onAbort?: ErrorHandler): void
replace(location: RawLocation): Promise<Route>
replace(location: RawLocation, onComplete?: Function, onAbort?: ErrorHandler): void
push(location: RouteLocationRaw): Promise<Route>
push(location: RouteLocationRaw, onComplete?: Function, onAbort?: ErrorHandler): void
replace(location: RouteLocationRaw): Promise<Route>
replace(location: RouteLocationRaw, onComplete?: Function, onAbort?: ErrorHandler): void
go(n: number): void
back(): void
forward(): void
match(raw: RawLocation, current?: Route, redirectedFrom?: Location): Route
getMatchedComponents(to?: RawLocation | Route): Component[]
match(raw: RouteLocationRaw, current?: Route, redirectedFrom?: Location): Route
getMatchedComponents(to?: RouteLocationRaw | Route): Component[]
onReady(cb: Function, errorCb?: ErrorHandler): void
onError(cb: ErrorHandler): void
addRoutes(routes: RouteConfig[]): void
AddRoute(parent: string, route: RouteConfig): void
AddRoute(route: RouteConfig): void
resolve(
to: RawLocation,
to: RouteLocationRaw,
current?: Route,
append?: boolean
): {
Expand All @@ -52,19 +52,19 @@ declare interface Location {
append?: boolean
replace?: boolean
}
declare type RawLocation = string | Location
declare type RawLocation = RouteLocationRaw
declare interface Route {
path: string
name?: string | null
hash: string
query: Dictionary<string | (string | null)[]>
params: Dictionary<string>
query: LocationQuery
params: RouteParams
fullPath: string
matched: RouteRecord[]
redirectedFrom?: string
meta?: RouteMeta
}
declare type RedirectOption = RawLocation | ((to: Route) => RawLocation)
declare type RedirectOption = RouteLocationRaw | ((to: Route) => RouteLocationRaw)
declare interface PathToRegexpOptions {
sensitive?: boolean
strict?: boolean
Expand Down Expand Up @@ -117,7 +117,7 @@ declare interface RouteRecordPublic {
name?: string
redirect?: RedirectOption
meta: any
beforeEnter?: (route: Route, redirect: (location: RawLocation) => void, next: () => void) => any
beforeEnter?: (route: Route, redirect: (location: RouteLocationRaw) => void, next: () => void) => any
props:
| boolean
| Record<string, any>
Expand Down Expand Up @@ -161,6 +161,7 @@ export {
isVueRouter4,
RouterMode,
RawLocation,
RouteLocationRaw,
RedirectOption,
RouteConfig,
RouteRecordPublic,
Expand Down

0 comments on commit ad7f3ab

Please sign in to comment.