diff --git a/packages/vscode-vue-languageservice/src/use/useSfcEntryForTemplateLs.ts b/packages/vscode-vue-languageservice/src/use/useSfcEntryForTemplateLs.ts index 6f0e340a63..bbe51625a9 100644 --- a/packages/vscode-vue-languageservice/src/use/useSfcEntryForTemplateLs.ts +++ b/packages/vscode-vue-languageservice/src/use/useSfcEntryForTemplateLs.ts @@ -46,8 +46,8 @@ export function useSfcEntryForTemplateLs( else { content += `export var __VLS_options = {};\n`; content += `export var __VLS_name = undefined;\n`; - content += `declare var __VLS_component_ts: any;\n`; - content += `export declare var __VLS_component: any;\n`; + content += `var __VLS_component_ts = __VLS_defineComponent({});\n`; + content += `export var __VLS_component = __VLS_defineComponent({});\n`; } content += `declare var __VLS_ctx: __VLS_PickNotAny, ReturnType>;\n`; content += `declare var __VLS_ComponentsWrap: typeof __VLS_options & { components: { } };\n`;