Skip to content

Commit d046879

Browse files
authored
allow typeCheck cli flag to override transpileOnly tsconfig flag (#1142)
1 parent c1e6e3e commit d046879

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,8 @@ export function create (rawOptions: CreateOptions = {}): Register {
447447

448448
const readFile = options.readFile || ts.sys.readFile
449449
const fileExists = options.fileExists || ts.sys.fileExists
450-
const transpileOnly = options.transpileOnly === true || options.typeCheck === false
450+
// typeCheck can override transpileOnly, useful for CLI flag to override config file
451+
const transpileOnly = options.transpileOnly === true && options.typeCheck !== true
451452
const transformers = options.transformers || undefined
452453
const ignoreDiagnostics = [
453454
6059, // "'rootDir' is expected to contain all source files."

0 commit comments

Comments
 (0)