-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
contribution welcomeThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issuegood first issueGood for newcomersGood for newcomerstypescriptProblem related to TS typingsProblem related to TS typings
Description
Version
4.0.10
Reproduction link
https://codesandbox.io/s/vue-router-nextundefined-example-xz4yo
Steps to reproduce
- Use a navigation guard.
- Write
next(undefined)
What is expected?
next(undefined)
works the same way as next()
since empty argument is treated as undefined
in JS.
What is actually happening?
next(undefined)
throws
Argument of type 'undefined' is not assignable to parameter of type 'NavigationGuardNextCallback'
It seems that the NavigationGuardNext
interface must be changed to either have an undefined
argument as a separate row or to make one of the options optional.
Metadata
Metadata
Assignees
Labels
contribution welcomeThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issuegood first issueGood for newcomersGood for newcomerstypescriptProblem related to TS typingsProblem related to TS typings