Extract types similar to api-extractor. Made specifically for `titan-reactor` api extraction as it has special requirements. Made available publicly in case it is useful. Unroll types is a bit of a misnomer but whatever.
npm install unroll-typestitan-reactor api extraction as it has special requirements. Made available publicly in case it is useful. Unroll types is a bit of a misnomer but whatever.
bash
npm install -g unroll-types
`
or use npx to execute.
Command Line
`bash
unroll-types my-file.ts
`
>Will output ./unrolled.d.ts
`bash
unroll-types my-file.ts --include ./src
`
> Will include all src directory for the typescript compiler host to resolve relative imports.
`bash
unroll-types my-file.ts --tsconfig tsconfig.json
`
> Will pass the tsconfig.json file to the compiler
`bash
unroll-types my-file.js
`
> Will work with .js files out of the box
`bash
unroll-types my-file.ts --include-as ./other my-alias
`
> Will add my-alias to paths for module name resolution
`bash
unroll-types my-file.ts --out types.d.ts
`
> Changes the output file to ./types.d.ts
`bash
unroll-types --help
`
> Shows help text
`bash
unroll-types my-file.ts --ts_checkJs true
`
> Pass additional ts compiler options using ts_*`