Skip to content

Commit

Permalink
added some doc info
Browse files Browse the repository at this point in the history
  • Loading branch information
Harris-Miller committed Jul 7, 2022
1 parent 934f0a3 commit bf55a26
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ By default, patterns resolve against the rootDir set in your TS config file.

This can fix plugin errors when parsing files outside the current working directory (process.cwd()).

### `transpilationMode`

Type: `'full' | 'declarationOnly' | 'transpileOnly' | 'none'`<br>
Default: `'full'`

* `'full'` always transpile code and emit declarations
* `'declarationOnly'` only emit declarations, raw typescript code will be passed to next plugin
* this is useful if the next plugin is `@rollup/plugin-babel` and you have it set up to transpile typescript via `babel-plugin-typescript`
* this is effectively the same as the `tsc --emitDeclarationOnly && babel src --out-dir dist`
* Also useful if you're having typescript emit declaration for your js file, but don't have any ts files to transpile
* `'transpileOnly'` transpile code, but don't emit declarations. Type errors will still be displayed
* `'none'` no transpilation or declarations. Raw typescript code will be passed to the next plugin. Type errors will still be displayed
* This is useful if you want type errors to display, but don't want declarations files, and then have `@rollup/plugin-babel` do all your transpilation

### `tsconfig`

Type: `String` | `Boolean`<br>
Expand Down

0 comments on commit bf55a26

Please sign in to comment.