vuejs / language-tools

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

Vue LS gives not full error information outside Hybrid Mode #4733

Open toNeptune9 opened 2 months ago

toNeptune9 commented 2 months ago

Vue - Official extension or vue-tsc version

Vue - Official, v.2.0.28

VSCode version

1.92.2

Vue version

3.3.4

TypeScript version

5.5.3

System Info

No response

Steps to reproduce

0) Disable the Hybrid Mode in VSCode 1) Create a Vue file 2) Paste into script part the following TS code:

export type StrictTranslationKey = 'test'

export function bindEnumeratedTranslations<Key extends string>(list: readonly Key[], mapping: (key: Key) => StrictTranslationKey): Record<Key, string>
export function bindEnumeratedTranslations<Enum extends Record<string, string | number>>(value: Enum, mapping: (key: Enum[string]) => StrictTranslationKey): Record<Enum[string], string>
export function bindEnumeratedTranslations<Key extends string, Enum extends Record<string, string | number>>(list: readonly Key[] | Enum, mapping: (key: Key | Enum[string]) => StrictTranslationKey): Record<any, any> {
    // stub
    return {}
}

const correct = bindEnumeratedTranslations(['test', 'test2'], key => 'test')

const error = bindEnumeratedTranslations(['test', 'test2'], key => 'wrong')

3) Check the error for bindEnumeratedTranslations at the line

const error = bindEnumeratedTranslations(['test', 'test2'], key => 'wrong')

What is expected?

Full error description like this:

image5

This works only with enabled Hybrid Mode.

What is actually happening?

Not full error description:

vscode missed

image6

Link to minimal reproduction

No response

Any additional comments?

No response

zaalbarxx commented 2 months ago

Related Webstorm issue: https://youtrack.jetbrains.com/issue/WEB-66674