Parsing

Znai uses typescript nodejs module to parse TypeScript. Use the typescript plugin to include parsed information.

Properties

/** * top level doc string */ export class Customer { /** * customer's first name */ firstName: string; /** * customer's last name */ lastName: string; /** * method A <b>description</b> and some * @param {string} input for <i>test</i> */ methodA(input: string) { console.log('method a body'); console.log('test22'); } } Use the propertiesOf parameter to list properties of a specified class. :include-typescript: typescript/Customer.ts {propertiesOf: "Customer"}

JSX Elements

import { PrimaryButton } from 'my-lib'; function buttonsDemo(registry) { registry .add('primary', <PrimaryButton label="Click Me"/>) .add('primary disabled', <PrimaryButton label="Click Me" disabled={true}/>); } Use the jsxElementsFrom to extract JSX elements from a function. :include-typescript: typescript/demo.tsx {jsxElementsFrom: "buttonsDemo"}