#2758·vue-router

为 `next` 创建类型声明

作者: Midnighter创建于 2019年5月7日更新于 2025年7月15日
标签Typescripthas PRfixed on 4.x

这个功能解决了什么问题? 目前,router.d.ts中定义了NavigationGuard的类型。这很方便。在其中,next参数是一个函数,接受不同类型的联合作为参数。

内容来源: vuejs/vue-router