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

Vue 3.5 global directive types are not picked up by vue-tsc / volar #4804

Closed
SomaH123 opened this issue Sep 4, 2024 · 1 comment · Fixed by #4807
Closed

Vue 3.5 global directive types are not picked up by vue-tsc / volar #4804

SomaH123 opened this issue Sep 4, 2024 · 1 comment · Fixed by #4807
Labels
enhancement New feature or request

Comments

@SomaH123
Copy link

SomaH123 commented Sep 4, 2024

Vue - Official extension or vue-tsc version

2.1.4

VSCode version

1.92

Vue version

3.5.0

TypeScript version

5.5.3

System Info

System:
    OS: Linux 6.6 Manjaro Linux
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 12.88 GB / 31.08 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: 9.6.0 - /usr/bin/pnpm
  Browsers:
    Chromium: 127.0.6533.119

package.json dependencies

No response

Steps to reproduce

The latest Vue minor (3.5.0) introduced support for better typing of global directives (vuejs/core#3399), but vue-tsc and volar seem to completely ignore it and keep the custom global directive types as any.

Reproduction:

  1. Alter GlobalDirectives with a custom directive:
    declare module '@vue/runtime-core' { interface GlobalDirectives { VTooltip: VTooltip } }
  2. Use v-tooltip in a Vue SFC

What is expected?

v-tooltip has typescript support

What is actually happening?

v-tooltip is typed as any

Link to minimal reproduction

No response

Any additional comments?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@SomaH123 @KazariEX and others