vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.87k stars 400 forks source link

Global types are repeatedly defined in monorepo #4717

Closed johnsoncodehk closed 2 months ago

johnsoncodehk commented 2 months ago

Vue - Official extension or vue-tsc version

2.0.28

VSCode version

1.92.2

Vue version

3.4.38

TypeScript version

5.5.4

System Info

No response

Steps to reproduce

  1. Reload VSCode.
  2. Open packages/lib/src/TestComp.vue.
  3. Then open packages/app/src/App.vue.

What is expected?

App.vue does not produce unexpected errors.

What is actually happening?

App.vue produce the following error:

Definitions of the following identifiers conflict with those in another file: __VLS_IntrinsicElements, __VLS_Element, __VLS_GlobalComponents, __VLS_IsAny, __VLS_PickNotAny, __VLS_intrinsicElements, __VLS_SelfComponent, __VLS_WithComponent, __VLS_FunctionalComponentProps, __VLS_IsFunction, __VLS_UnionToIntersection, __VLS_OverloadUnionInner, __VLS_OverloadUnion, __VLS_ConstructorOverloads, __VLS_NormalizeEmits, __VLS_PrettifyGlobalts(6200)

Link to minimal reproduction

https://github.com/davidmatter/vue-lang-tools-mono-repro

Any additional comments?

Related comments: https://github.com/vuejs/language-tools/issues/4607#issuecomment-2244018570, https://github.com/vuejs/language-tools/issues/4231#issuecomment-2042575846