From 394a3b6cce5e395ae4ccf3e2efb0c115d492978c Mon Sep 17 00:00:00 2001 From: Max Novikov Date: Thu, 27 May 2021 15:35:03 +0300 Subject: [PATCH] fix(types): added missing router.match (#3554) --- types/router.d.ts | 1 + types/test/index.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/types/router.d.ts b/types/router.d.ts index e6d52425f..80de5e224 100644 --- a/types/router.d.ts +++ b/types/router.d.ts @@ -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 diff --git a/types/test/index.ts b/types/test/index.ts index 3405e0765..44de15098 100644 --- a/types/test/index.ts +++ b/types/test/index.ts @@ -229,6 +229,8 @@ const Components: ( | AsyncComponent )[] = router.getMatchedComponents() +const match: Route = router.match('/more'); + const vm = new Vue({ router, template: `