From 6a707b87196300a5c0a5bb25dceb90b550c3a5ca Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 31 Oct 2020 20:53:13 -0400 Subject: [PATCH] allow typeCheck cli flag to override transpileOnly tsconfig flag --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index e2b759afc..491f7f4dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -447,7 +447,8 @@ export function create (rawOptions: CreateOptions = {}): Register { const readFile = options.readFile || ts.sys.readFile const fileExists = options.fileExists || ts.sys.fileExists - const transpileOnly = options.transpileOnly === true || options.typeCheck === false + // typeCheck can override transpileOnly, useful for CLI flag to override config file + const transpileOnly = options.transpileOnly === true && options.typeCheck !== true const transformers = options.transformers || undefined const ignoreDiagnostics = [ 6059, // "'rootDir' is expected to contain all source files."