8000 Vue 3.5 global directive types are not picked up by vue-tsc / volar · Issue #4804 · vuejs/language-tools · GitHub
[go: up one dir, main page]

Skip to content
Vue 3.5 global directive types are not picked up by vue-tsc / volar #4804
Closed
@SomaH123

Description

@SomaH123

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0