Skip to content

Commit 57eebba

Browse files
committed
Use JSDocs
1 parent 598cfad commit 57eebba

File tree

1 file changed

+4
-3
lines changed
  • packages/language-core/lib/codegen/template

1 file changed

+4
-3
lines changed

packages/language-core/lib/codegen/template/element.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,11 @@ export function* generateComponent(
148148
const camelizedTag = camelize(node.tag);
149149
if (variableNameRegex.test(camelizedTag)) {
150150
// renaming / find references support
151+
yield `/** @type { [`;
151152
for (const tagOffset of tagOffsets) {
152153
for (const shouldCapitalize of (node.tag[0] === node.tag[0].toUpperCase() ? [false] : [true, false])) {
153154
const expectName = shouldCapitalize ? capitalize(camelizedTag) : camelizedTag;
154-
yield `__VLS_components.`;
155+
yield `typeof __VLS_components.`;
155156
yield* generateCamelized(
156157
shouldCapitalize ? capitalize(node.tag) : node.tag,
157158
tagOffset,
@@ -162,10 +163,10 @@ export function* generateComponent(
162163
},
163164
}
164165
);
165-
yield `;`;
166+
yield `, `;
166167
}
167168
}
168-
yield `${newLine}`;
169+
yield `] } */${newLine}`;
169170
// auto import support
170171
if (options.edited) {
171172
yield `// @ts-ignore${newLine}`; // #2304

0 commit comments

Comments
 (0)