Open toNeptune9 opened 2 months ago
Vue - Official, v.2.0.28
1.92.2
3.3.4
5.5.3
No response
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
bindEnumeratedTranslations
const error = bindEnumeratedTranslations(['test', 'test2'], key => 'wrong')
Full error description like this:
This works only with enabled Hybrid Mode.
Not full error description:
Related Webstorm issue: https://youtrack.jetbrains.com/issue/WEB-66674
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:
3) Check the error for
bindEnumeratedTranslations
at the lineWhat is expected?
Full error description like this:
This works only with enabled Hybrid Mode.
What is actually happening?
Not full error description:
Link to minimal reproduction
No response
Any additional comments?
No response