bikeshed-to-ts

Extract a TypeScript declaration file from a bikeshed document.

Usage no npm install needed!

<script type="module">
  import bikeshedToTs from 'https://cdn.skypack.dev/bikeshed-to-ts';
</script>

README

bikeshed-to-ts

Creates a type definition file by parsing a lib specification in bikeshed format. Includes TypeDoc comments where available.

Getting started

Add the module to your project:

$ yarn add bikeshed-to-ts --dev

Run from the command line:

$ yarn bikeshed-to-ts --in <bikeshed_file> -- out <typedef_file>

Run from a script in your package.json:

{
  ...
  "scripts": {
    "peer": "bikeshed-to-ts --in <bikeshed_file> -- out <typedef_file>"
  },
  ...
}

Usage and available options can be found at:

$ yarn bikeshed-to-ts --help

It can be installed globally:

$ yarn global add bikeshed-to-ts

Usage

  Usage: bikeshed-to-ts --in <file-path> --out <file-path> [flags]

  Options:
    --in, -i		 Path to a bikeshed file to parse.
    --out, -o		 Path to a TypeScript definitions file to write.
    --forceGlobal, -f	 When present, all declarations will be added to the global context
    --nominal, -n	 When present, types declarations will be made nominal when possible
    --version, -v	 Print version and exit