Skip to content

Commit

Permalink
allow typeCheck cli flag to override transpileOnly tsconfig flag (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode authored Nov 3, 2020
1 parent c1e6e3e commit d046879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -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."

0 comments on commit d046879

Please sign in to comment.