getPropertyType
Strip | undefined only when it was implicitly added by ts-morph for optional properties
Import:
import { getPropertyType } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-jsdoc';Signature:
function getPropertyType(property: PropertyDeclaration | PropertySignature): stringParameters:
| Parameter | Type | Description |
|---|---|---|
property |
PropertyDeclaration | PropertySignature | The property. |
Returns: string — The type text.