Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volar v1.0.10 recognize RouterLink component type as never #2157

Closed
hongquan opened this issue Nov 30, 2022 · 9 comments
Closed

Volar v1.0.10 recognize RouterLink component type as never #2157

hongquan opened this issue Nov 30, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@hongquan
Copy link

After upgrading to v1.0.10, Volar now recognizes RouterLink, RouterView components as never type:

image

@imaverickk
Copy link

Maybe you need to upgrade vue-tsc to the same version.

@hongquan
Copy link
Author

hongquan commented Dec 1, 2022

@imaverickk I upgraded vue-tsc and still get the same error. More than that, CI starts to fail because vue-tsc --noEmit now throws errors.

@johnsoncodehk
Copy link
Member

What is the RouterLink type in v1.0.9?

@imaverickk
Copy link

Everything works fine for me, in v1.0.9 and v 1.0.10 the type of RouterLink is _RouterLinkI

@hongquan
Copy link
Author

hongquan commented Dec 1, 2022

This is how v1.0.9 recognizes RouterLink:

image

@xiaoxiangmoe
Copy link
Collaborator

@hongquan Can you provide a reproduction demo?

@hongquan
Copy link
Author

hongquan commented Dec 1, 2022

@xiaoxiangmoe I will try tomorrow (not sure if a small demo can reproduce it, or the issue depends on something in my project).

@hongquan
Copy link
Author

hongquan commented Dec 2, 2022

Hi, I copied part of my project to provide a reproduction demo: https://bitbucket.org/hongquan/vue-tsc-router/src/main/
You can see the issue in LobbyPage.vue and FacilityView.vue files.

@jbmaisner
Copy link

Same issue here, in fact it happens on all global components, despite a declaration file like explained in documentation :

// For vue 2.7
declare module 'vue' {
  export interface GlobalComponents {
    RouterLink: typeof import('vue-router')['RouterLink']
    RouterView: typeof import('vue-router')['RouterView']
    // ...
    // + my own global components
    // ...
  }
}

export {};

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Dec 3, 2022
so1ve added a commit to so1ve/language-tools that referenced this issue Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants