@evokegroup/jsdoc-transform
v1.0.10
Published
This package processes [JSDoc](https://jsdoc.app/) comments.
Downloads
17
Keywords
Readme
@evokegroup/jsdoc-transform
This package processes JSDoc comments.
parseJsdoc()
Parses JSDoc comments in the given content.
Parameters
| Parameter | Type | Description | | --------- | ---- | ----------- | | content | string | The content containing the JSDoc comments |
Returns
Array<object>
jsdocToTypescript()
Parses JSDoc comments in files matching a pattern and transforms them into TypeScript definition files.
Parameters
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| pattern | string | The glob pattern |
| opts | object | Options |
| opts.globOptions | The glob options |
| opts.outputDir | string | The directory to write the *.d.ts
files to |
Returns
Promise<void>
Example
const { jsdocToTypescript } = require('@evokegroup/jsdoc-transform');
await jsdocToTypescript('src/*.js', { outputDir: 'types' });