Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(language-core): inject generics of useTemplateRef into correct location #4829

Merged
merged 7 commits into from
Oct 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into pr/4829
  • Loading branch information
johnsoncodehk committed Oct 24, 2024
commit 3eca8709a0bb0f1b282e4a084214896be9f77a53
41 changes: 16 additions & 25 deletions packages/language-core/lib/codegen/script/scriptSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,30 +194,21 @@ function* generateSetupFunction(
}
if (scriptSetupRanges.cssModules.length) {
for (const { define } of scriptSetupRanges.cssModules) {
if (define.arg) {
setupCodeModifies.push([
[
` as Omit<__VLS_StyleModules, '$style'>[`,
generateSfcBlockSection(scriptSetup, define.arg.start, define.arg.end, codeFeatures.all),
`]`
],
define.exp.end,
define.exp.end
]);
}
else {
setupCodeModifies.push([
[
` as __VLS_StyleModules[`,
['', scriptSetup.name, define.exp.start, codeFeatures.verification],
`'$style'`,
['', scriptSetup.name, define.exp.end, codeFeatures.verification],
`]`
],
define.exp.end,
define.exp.end
]);
}
setupCodeModifies.push([
define.arg ? [
` as Omit<__VLS_StyleModules, '$style'>[`,
generateSfcBlockSection(scriptSetup, define.arg.start, define.arg.end, codeFeatures.all),
`]`
] : [
` as __VLS_StyleModules[`,
['', scriptSetup.name, define.exp.start, codeFeatures.verification],
`'$style'`,
['', scriptSetup.name, define.exp.end, codeFeatures.verification],
`]`
],
define.exp.end,
define.exp.end
]);
}
}
for (const { define } of scriptSetupRanges.templateRefs) {
Expand Down Expand Up @@ -283,7 +274,7 @@ function* generateDefineWithType(
name: string | undefined,
define: {
statement: TextRange,
typeArg?: TextRange
typeArg?: TextRange;
},
expression: TextRange,
defaultName: string,
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.