Skip to content

Types not compatible with Vue 2.6 in "strict" type checking mode #3786

Closed
@rchl

Description

@rchl

Version

3.6.4

Reproduction link

codesandbox.io

Steps to reproduce

  1. Go to /src/main.js
  2. Right click the Router import and select Go to Definition
  3. Notice how there is an error in the definition of the type Component type

What is expected?

No errors with Vue 2.6

What is actually happening?

Error Generic type 'Component' requires between 0 and 4 type arguments.


Component has different amount of generic arguments in Vue 2.7 compared to Vue 2.6 so this code is not compatible with Vue 2.6. Since vue-router passes 5 arguments, this triggers a typescript error if strict option in tsconfig is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions