Skip to content

Commit

Permalink
fix: typo of composables
Browse files Browse the repository at this point in the history
  • Loading branch information
KazariEX committed Dec 8, 2024
1 parent dc90036 commit 5784131
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/language-core/lib/parsers/scriptSetupRanges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/language-core/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface VueCompilerOptions {
defineOptions: string[];
withDefaults: string[];
};
composibles: {
composables: {
useCssModule: string[];
useTemplateRef: string[];
};
Expand Down
4 changes: 2 additions & 2 deletions packages/language-core/lib/utils/ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ export function resolveVueCompilerOptions(vueOptions: Partial<VueCompilerOptions
withDefaults: ['withDefaults'],
...vueOptions.macros,
},
composibles: {
composables: {
useCssModule: ['useCssModule'],
useTemplateRef: ['useTemplateRef', 'templateRef'],
...vueOptions.composibles,
...vueOptions.composables,
},
plugins: vueOptions.plugins ?? [],

Expand Down

0 comments on commit 5784131

Please sign in to comment.