From: Carlos Rodrigues Date: Tue, 23 Jun 2020 13:02:59 +0000 (+0100) Subject: types: Add type to NavigationGuardNextCallback (#205) X-Git-Tag: v4.0.0-alpha.14~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87fcfd4654a08e3b581152df15c5492320a1138e;p=thirdparty%2Fvuejs%2Frouter.git types: Add type to NavigationGuardNextCallback (#205) * types: Add type to NavigationGuardNexCallback * Update src/types/index.ts Co-authored-by: Eduardo San Martin Morote --- diff --git a/src/types/index.ts b/src/types/index.ts index b12421bb..3fa40077 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,6 +1,6 @@ import { LocationQuery, LocationQueryRaw } from '../query' import { PathParserOptions } from '../matcher' -import { Ref, ComputedRef, Component } from 'vue' +import { Ref, ComputedRef, Component, ComponentPublicInstance } from 'vue' import { RouteRecord, RouteRecordNormalized } from '../matcher/types' import { HistoryState } from '../history/common' import { NavigationFailure } from '../errors' @@ -279,7 +279,7 @@ export interface NavigationGuardNext { (cb: NavigationGuardNextCallback): void } -export type NavigationGuardNextCallback = (vm: any) => any +export type NavigationGuardNextCallback = (vm: ComponentPublicInstance) => any export interface NavigationGuard { (