Skip to content

Commit

Permalink
fix(types): added missing router.match (#3554)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNvk committed May 27, 2021
1 parent af538e0 commit 394a3b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/router.d.ts
Expand Up @@ -43,6 +43,7 @@ export declare class VueRouter {
go(n: number): void
back(): void
forward(): void
match (raw: RawLocation, current?: Route, redirectedFrom?: Location): Route
getMatchedComponents(to?: RawLocation | Route): Component[]
onReady(cb: Function, errorCb?: ErrorHandler): void
onError(cb: ErrorHandler): void
Expand Down
2 changes: 2 additions & 0 deletions types/test/index.ts
Expand Up @@ -229,6 +229,8 @@ const Components: (
| AsyncComponent
)[] = router.getMatchedComponents()

const match: Route = router.match('/more');

const vm = new Vue({
router,
template: `
Expand Down

0 comments on commit 394a3b6

Please sign in to comment.