Skip to content

Commit 9608709

Browse files
committed
fix(language-core): avoid invalid __VLS_Slots generation
1 parent c65e5a5 commit 9608709

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/language-core/lib/codegen/script/scriptSetup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function* generateGeneric(
115115
}
116116
yield `) => void${endOfLine}`;
117117
yield ` attrs: any${endOfLine}`;
118-
yield ` slots: ${names.Slots}${endOfLine}`;
118+
yield ` slots: ${hasSlotsType(options) ? names.Slots : `{}`}${endOfLine}`;
119119
yield ` emit: ${emitTypes.length ? emitTypes.join(` & `) : `{}`}${endOfLine}`;
120120
yield `}${endOfLine}`;
121121
yield `})(),${newLine}`; // __VLS_setup = (async () => {

0 commit comments

Comments
 (0)