Skip to content

Commit 394a3b6

Browse files
authored
fix(types): added missing router.match (#3554)
1 parent af538e0 commit 394a3b6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: types/router.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export declare class VueRouter {
4343
go(n: number): void
4444
back(): void
4545
forward(): void
46+
match (raw: RawLocation, current?: Route, redirectedFrom?: Location): Route
4647
getMatchedComponents(to?: RawLocation | Route): Component[]
4748
onReady(cb: Function, errorCb?: ErrorHandler): void
4849
onError(cb: ErrorHandler): void

Diff for: types/test/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ const Components: (
229229
| AsyncComponent
230230
)[] = router.getMatchedComponents()
231231

232+
const match: Route = router.match('/more');
233+
232234
const vm = new Vue({
233235
router,
234236
template: `

0 commit comments

Comments
 (0)