Skip to content

Commit de911cd

Browse files
committed
fix: omit empty type suffix for properties
1 parent 422fd07 commit de911cd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server/utils/docs/render.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,10 @@ function renderClassMembers(def: NonNullable<DenoDocNode['classDef']>): string {
306306
const modStr = modifiers.length > 0 ? `${modifiers.join(' ')} ` : ''
307307
const type = formatType(prop.tsType)
308308
const opt = prop.optional ? '?' : ''
309+
const typeStr = type ? `: ${type}` : ''
309310

310311
return {
311-
signature: `${modStr}${prop.name}${opt}: ${type}`,
312+
signature: `${modStr}${prop.name}${opt}${typeStr}`,
312313
description: prop.jsDoc?.doc,
313314
}
314315
})

0 commit comments

Comments
 (0)