From 73b4c2b03818142bb5a469a37bb91ae67ed6d6dc Mon Sep 17 00:00:00 2001 From: zhiyuanzmj <32807958+zhiyuanzmj@users.noreply.github.com> Date: Fri, 27 Dec 2024 01:25:59 +0800 Subject: [PATCH] fix(language-core): ignore ts errors in function-scoped declare expressions (#5090) --- packages/language-core/lib/codegen/script/scriptSetup.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/language-core/lib/codegen/script/scriptSetup.ts b/packages/language-core/lib/codegen/script/scriptSetup.ts index 8f357a734b..a7b6a588df 100644 --- a/packages/language-core/lib/codegen/script/scriptSetup.ts +++ b/packages/language-core/lib/codegen/script/scriptSetup.ts @@ -321,6 +321,7 @@ function* generateMacros( ctx: ScriptCodegenContext ): Generator { if (options.vueCompilerOptions.target >= 3.3) { + yield `// @ts-ignore${newLine}`; yield `declare const { `; for (const macro of Object.keys(options.vueCompilerOptions.macros)) { if (!ctx.bindingNames.has(macro)) {