Skip to content

Commit ea95b66

Browse files
committed
fix(legacy-json): don't double-signature ctors
1 parent e6e3f43 commit ea95b66

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/generators/legacy-json/utils/parseList.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ export function parseList(section, nodes) {
9494

9595
// Update the section based on its type and parsed values
9696
switch (section.type) {
97-
case 'ctor':
97+
case 'ctor': {
98+
const signature = parseSignature(section.textRaw, values);
99+
100+
Object.keys(signature).forEach(key => (section[key] ??= signature[key]));
101+
102+
break;
103+
}
104+
98105
case 'classMethod':
99106
case 'method':
100107
// For methods and constructors, parse and attach signatures

0 commit comments

Comments
 (0)