Skip to content

Commit f308124

Browse files
fix: ensure class properties and static properties have their descriptions
Closes #184
1 parent 8204596 commit f308124

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/module-declaration.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ export const generateModuleDeclaration = (
309309
const isReadonly = prop.additionalTags.includes(DocumentationTag.AVAILABILITY_READONLY)
310310
? 'readonly '
311311
: '';
312+
if (prop.description) {
313+
utils.extendArray(
314+
moduleAPI,
315+
utils.wrapComment(prop.description, prop.additionalTags),
316+
);
317+
}
312318
moduleAPI.push(`${isReadonly}${prop.name}${isOptional}: ${utils.typify(prop)};`);
313319
});
314320
}
@@ -321,6 +327,12 @@ export const generateModuleDeclaration = (
321327
const isReadonly = prop.additionalTags.includes(DocumentationTag.AVAILABILITY_READONLY)
322328
? 'readonly '
323329
: '';
330+
if (prop.description) {
331+
utils.extendArray(
332+
moduleAPI,
333+
utils.wrapComment(prop.description, prop.additionalTags),
334+
);
335+
}
324336
moduleAPI.push(`static ${isReadonly}${prop.name}: ${utils.typify(prop)};`);
325337
});
326338
}

0 commit comments

Comments
 (0)