From ab402712ad838067344d393b0dd34646fb4cd91d Mon Sep 17 00:00:00 2001 From: KazariEX <1364035137@qq.com> Date: Mon, 4 Nov 2024 13:52:36 +0800 Subject: [PATCH] fix: intersect type of object key on `v-for` with `string` --- packages/language-core/lib/codegen/globalTypes.ts | 2 +- test-workspace/tsc/passedFixtures/vue3/v-for/generic.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/language-core/lib/codegen/globalTypes.ts b/packages/language-core/lib/codegen/globalTypes.ts index 9908372d43..c20296ed20 100644 --- a/packages/language-core/lib/codegen/globalTypes.ts +++ b/packages/language-core/lib/codegen/globalTypes.ts @@ -109,7 +109,7 @@ export function generateGlobalTypes(lib: string, target: number, strictTemplates ][]; function __VLS_getVForSourceType(source: T): [ item: T[keyof T], - key: keyof T, + key: keyof T & string, index: number, ][]; // @ts-ignore diff --git a/test-workspace/tsc/passedFixtures/vue3/v-for/generic.vue b/test-workspace/tsc/passedFixtures/vue3/v-for/generic.vue index ce87d40cbb..3493e23984 100644 --- a/test-workspace/tsc/passedFixtures/vue3/v-for/generic.vue +++ b/test-workspace/tsc/passedFixtures/vue3/v-for/generic.vue @@ -1,7 +1,7 @@