@rmtc/plugin-types-in-jsdoc
v1.0.0
Published
The toolchain TypeScript-in-JSDoc plugin
Downloads
12
Readme
@rmtc/plugin-types-in-jsdoc
A TypeScript-in-JSDoc plugin for @rmtc/toolchain. This checks types and builds type definitions based on jsconfig.json
.
[!WARNING] This project is intended for use in @rowanmanning's projects. It's free to use but I don't offer support for use-cases outside of what I need.
Table of Contents
Requirements
This library requires the following to run:
Usage
Install the module with npm:
npm install --save-dev @rmtc/plugin-types-in-jsdoc
Include it in your .rmtc.json
file:
{
plugins: [
// ...
'@rmtc/plugin-types-in-jsdoc'
]
// ...
}
Workflows
This plugin defines the following workflows:
verify
: a general workflow used to verify code quality.build
: a general workflow used to generate code output and other compiled assets.
Steps
This plugin defines the following steps that can be added to any workflow:
types-in-jsdoc:check-types
: run thetsc
command-line tool against a JavaScript project to check that it's type-safe, without emitting any type definitions. This expects ajsconfig.json
file to live in the root of the project.types-in-jsdoc:build-defs
: run thetsc
command-line tool against a JavaScript project to generate.d.ts
files from any JSDoc found. This expects ajsconfig.json
file to live in the root of the project.
Configuration
Most of the configuration for this plugin should live within the jsconfig.json
file. See the TypeScript documentation for more information.
config.project
string
. Use this configuration to specify a different location than jsconfig.json
, relative to the project directory. E.g.
{
plugins: [
['@rmtc/plugin-types-in-jsdoc', {
project: 'config/types-in-jsdoc.json'
}]
]
}
Contributing
See the central README for a contribution guide and code of conduct.
License
Licensed under the MIT license. Copyright © 2023, Rowan Manning