@rmtc/plugin-types-in-jsdoc
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@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 the tsc command-line tool against a JavaScript project to check that it's type-safe, without emitting any type definitions. This expects a jsconfig.json file to live in the root of the project.

  • types-in-jsdoc:build-defs: run the tsc command-line tool against a JavaScript project to generate .d.ts files from any JSDoc found. This expects a jsconfig.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

Readme

Keywords

none

Package Sidebar

Install

npm i @rmtc/plugin-types-in-jsdoc

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.13 kB

Total Files

5

Last publish

Collaborators

  • rowanmanning