From 2fb26d4ade4ad8c33ce17d97658c992d57639593 Mon Sep 17 00:00:00 2001 From: johnsoncodehk Date: Sat, 3 Dec 2022 12:18:59 +0800 Subject: [PATCH] fix: don't omit context keys for global components close #2157, open #1886 --- vue-language-tools/vue-language-core/src/generators/script.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vue-language-tools/vue-language-core/src/generators/script.ts b/vue-language-tools/vue-language-core/src/generators/script.ts index 36fc2dcfd..b0beb360e 100644 --- a/vue-language-tools/vue-language-core/src/generators/script.ts +++ b/vue-language-tools/vue-language-core/src/generators/script.ts @@ -627,7 +627,7 @@ export function generate( /* Components */ codeGen.push('/* Components */\n'); codeGen.push(`let __VLS_localComponents!: NonNullable & typeof __VLS_componentsOption & typeof __VLS_ctx;\n`); - codeGen.push(`let __VLS_otherComponents!: typeof __VLS_localComponents & Omit;\n`); + codeGen.push(`let __VLS_otherComponents!: typeof __VLS_localComponents & import('./__VLS_types.js').GlobalComponents;\n`); codeGen.push(`let __VLS_own!: import('./__VLS_types.js').SelfComponent { ${getSlotsPropertyName(vueCompilerOptions.target ?? 3)}: typeof __VLS_slots })>;\n`); codeGen.push(`let __VLS_components!: typeof __VLS_otherComponents & Omit;\n`);