(ts: TSCommon, config: _ts.ParsedCommandLine)
| 34 | * Do post-processing on config options to support `ts-node`. |
| 35 | */ |
| 36 | function fixConfig(ts: TSCommon, config: _ts.ParsedCommandLine) { |
| 37 | // Delete options that *should not* be passed through. |
| 38 | delete config.options.out; |
| 39 | delete config.options.outFile; |
| 40 | delete config.options.composite; |
| 41 | delete config.options.declarationDir; |
| 42 | delete config.options.declarationMap; |
| 43 | delete config.options.emitDeclarationOnly; |
| 44 | |
| 45 | // Target ES5 output by default (instead of ES3). |
| 46 | if (config.options.target === undefined) { |
| 47 | config.options.target = ts.ScriptTarget.ES5; |
| 48 | } |
| 49 | |
| 50 | // Target CommonJS modules by default (instead of magically switching to ES6 when the target is ES6). |
| 51 | if (config.options.module === undefined) { |
| 52 | config.options.module = ts.ModuleKind.CommonJS; |
| 53 | } |
| 54 | |
| 55 | return config; |
| 56 | } |
| 57 | |
| 58 | /** @internal */ |
| 59 | export function findAndReadConfig(rawOptions: CreateOptions) { |
no outgoing calls
no test coverage detected
searching dependent graphs…