MCPcopy
hub / github.com/TypeStrong/ts-node / fixConfig

Function fixConfig

src/configuration.ts:36–56  ·  view source on GitHub ↗
(ts: TSCommon, config: _ts.ParsedCommandLine)

Source from the content-addressed store, hash-verified

34 * Do post-processing on config options to support `ts-node`.
35 */
36function 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 */
59export function findAndReadConfig(rawOptions: CreateOptions) {

Callers 1

readConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…