Generators
jsdocs
The jsdocs
generator can automatically read through your code and extract and sync documentation of function exports leveraging JSDocs and TypeScript hints.
Internally it uses untyped and jiti loader for JSDocs parsing and TypeScript support.
Example
Input
<!-- automd:jsdocs src="../../test/fixture/src/example" -->
<!-- /automd -->
Output
<!-- automd:jsdocs src="../../test/fixture/src/example" -->
### `add(a, b)`
Adds two numbers together.
**Example:**
```js
add(1, 2); // 3
```
### `object`
#### `key`
An object key
##### `subkey`
- **Type**: `string`
- **Default**: `"value"`
A subkey
<!-- /automd -->
Arguments
src
string
Path to the source file. The default is ./src/index
and can be omitted.
headingLevel
number
Nested level for markdown group headings (default is 2
=> ##
). Note: Each function uses headingLevel+1
for the title in nested levels.
group
string
Only render function exports annotated with @group name
. By default, there is no group filter. Value can be a string or an array of strings.