Skip to content

Type definition does not contain enumeration for NavigationFailureType #3293

Closed
@amjmhs

Description

@amjmhs

Version

3.4.2

Reproduction link

https://jsfiddle.net/dmop5w9b/

Steps to reproduce

I want to check for navigation-errors of a certain type. So there is the new VueRouter.isNavigationFailure function which takes a type as second parameter. But because of the missing type definition for this type, I can not call this function without typescript-errors.

if (VueRouter.isNavigationFailure(err, VueRouter.NavigationFailureType.duplicated)) {
 ...
}

Typescript error is: Property 'duplicated' does not exist on type 'NavigationFailureTypeE'.ts(2339)

I provided a fiddle with the code, but did not get the errors there... Those errors just appear in VSCode.

What is expected?

No typescript errors

What is actually happening?

Typescript errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    TypescriptTypescript related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions