Skip to content

Commit

Permalink
Remove deprecated --type-check option
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Oct 14, 2019
1 parent a7df137 commit 3ac95b4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
3 changes: 3 additions & 0 deletions register/files.js
@@ -0,0 +1,3 @@
require('../dist').register({
files: true
})
3 changes: 0 additions & 3 deletions register/type-check.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/bin.ts
Expand Up @@ -29,7 +29,6 @@ const args = arg({
'--ignore-diagnostics': [String],
'--ignore': [String],
'--transpile-only': Boolean,
'--type-check': Boolean,
'--pretty': Boolean,
'--skip-project': Boolean,
'--skip-ignore': Boolean,
Expand Down Expand Up @@ -65,7 +64,6 @@ const {
'--ignore-diagnostics': ignoreDiagnostics = DEFAULTS.ignoreDiagnostics,
'--ignore': ignore = DEFAULTS.ignore,
'--transpile-only': transpileOnly = DEFAULTS.transpileOnly,
'--type-check': typeCheck = DEFAULTS.typeCheck,
'--pretty': pretty = DEFAULTS.pretty,
'--skip-project': skipProject = DEFAULTS.skipProject,
'--skip-ignore': skipIgnore = DEFAULTS.skipIgnore,
Expand Down Expand Up @@ -126,7 +124,6 @@ const service = register({
build,
files,
pretty,
typeCheck,
transpileOnly,
ignore,
project,
Expand Down
6 changes: 2 additions & 4 deletions src/index.ts
Expand Up @@ -59,7 +59,6 @@ export interface Options {
cwd?: string | null
build?: boolean | null
pretty?: boolean | null
typeCheck?: boolean | null
transpileOnly?: boolean | null
logError?: boolean | null
files?: boolean | null
Expand Down Expand Up @@ -108,7 +107,6 @@ export const DEFAULTS: Options = {
skipIgnore: yn(process.env.TS_NODE_SKIP_IGNORE),
preferTsExts: yn(process.env.TS_NODE_PREFER_TS_EXTS),
ignoreDiagnostics: split(process.env.TS_NODE_IGNORE_DIAGNOSTICS),
typeCheck: yn(process.env.TS_NODE_TYPE_CHECK),
transpileOnly: yn(process.env.TS_NODE_TRANSPILE_ONLY),
logError: yn(process.env.TS_NODE_LOG_ERROR),
build: yn(process.env.TS_NODE_BUILD)
Expand Down Expand Up @@ -209,7 +207,7 @@ export function register (opts: Options = {}): Register {

// Require the TypeScript compiler and configuration.
const cwd = options.cwd || process.cwd()
const typeCheck = options.typeCheck === true || options.transpileOnly !== true
const transpileOnly = options.transpileOnly === true
const compiler = require.resolve(options.compiler || 'typescript', { paths: [cwd, __dirname] })
const ts: typeof _ts = require(compiler)
const transformers = options.transformers || undefined
Expand Down Expand Up @@ -277,7 +275,7 @@ export function register (opts: Options = {}): Register {
let getTypeInfo: (_code: string, _fileName: string, _position: number) => TypeInfo

// Use full language services when the fast option is disabled.
if (typeCheck) {
if (!transpileOnly) {
const memoryCache = new MemoryCache(config.fileNames)
const cachedReadFile = cachedLookup(debugFn('readFile', readFile))

Expand Down

0 comments on commit 3ac95b4

Please sign in to comment.