diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e27573f7a..c3ecffed71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,7 +97,7 @@ - **language-core:** split `__VLS_templateResult` (#4781) - Thanks to @KazariEX! - **language-core:** wrap template virtual code into a function (#4784) -- **language-core:** move `templateRef` into `composibles` (#4791) - Thanks to @KazariEX! +- **language-core:** move `templateRef` into `composables` (#4791) - Thanks to @KazariEX! - **language-core:** generate global types for the first parsed Vue component if cannot write global types file ### Tests diff --git a/packages/language-core/lib/parsers/scriptSetupRanges.ts b/packages/language-core/lib/parsers/scriptSetupRanges.ts index a95ab04f0a..0fe1995bd3 100644 --- a/packages/language-core/lib/parsers/scriptSetupRanges.ts +++ b/packages/language-core/lib/parsers/scriptSetupRanges.ts @@ -381,7 +381,7 @@ export function parseScriptSetupRanges( } } } - else if (vueCompilerOptions.composibles.useTemplateRef.includes(callText) && node.arguments.length && !node.typeArguments?.length) { + else if (vueCompilerOptions.composables.useTemplateRef.includes(callText) && node.arguments.length && !node.typeArguments?.length) { const define = parseDefineFunction(node); let name; if (ts.isVariableDeclaration(parent)) { @@ -392,7 +392,7 @@ export function parseScriptSetupRanges( define }); } - else if (vueCompilerOptions.composibles.useCssModule.includes(callText)) { + else if (vueCompilerOptions.composables.useCssModule.includes(callText)) { const define = parseDefineFunction(node); cssModules.push({ define diff --git a/packages/language-core/lib/types.ts b/packages/language-core/lib/types.ts index feb015576c..e5fd4b0f3d 100644 --- a/packages/language-core/lib/types.ts +++ b/packages/language-core/lib/types.ts @@ -43,7 +43,7 @@ export interface VueCompilerOptions { defineOptions: string[]; withDefaults: string[]; }; - composibles: { + composables: { useCssModule: string[]; useTemplateRef: string[]; }; diff --git a/packages/language-core/lib/utils/ts.ts b/packages/language-core/lib/utils/ts.ts index 4b8ebda122..4ea0d52cf1 100644 --- a/packages/language-core/lib/utils/ts.ts +++ b/packages/language-core/lib/utils/ts.ts @@ -251,10 +251,10 @@ export function resolveVueCompilerOptions(vueOptions: Partial