请问 typescript的vu-router中push方法应该怎么重写?
发布于 3 年前 作者 chaoren 1503 次浏览 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

我知道在js中的方法:

    const originalPush = Router.prototype.push
    Router.prototype.push = function push(location) {
       return originalPush.call(this, location).catch(err => err)
   }

那在typescript中应该怎么写呢?

回到顶部