diff --git a/README.md b/README.md index dc8c078cf..6bfb73818 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ ts-node --compiler ntypescript --project src --ignoreWarnings 2304 hello-world.t * **--ignoreWarnings, -I** Set an array of TypeScript diagnostic codes to ignore (also `process.env.TS_NODE_IGNORE_WARNINGS`) * **--disableWarnings, -D** Ignore all TypeScript errors (also `process.env.TS_NODE_DISABLE_WARNINGS`) * **--compilerOptions, -O** Set compiler options using JSON (E.g. `--compilerOptions '{"target":"es6"}'`) (also `process.env.TS_NODE_COMPILER_OPTIONS`) -* **--fast, -F** Use TypeScript's `transpileModule` mode (no type checking, but faster compilation) (also `process.env.TS_NODE_FAST`) +* **--type-check** Use TypeScript with type checking (also `process.env.TS_NODE_TYPE_CHECK`) * **--no-cache** Skip hitting the compiled JavaScript cache (also `process.env.TS_NODE_CACHE`) * **--cache-directory** Configure the TypeScript cache directory (also `process.env.TS_NODE_CACHE_DIRECTORY`) diff --git a/src/index.ts b/src/index.ts index 8fe8f8009..862758a2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -97,7 +97,7 @@ const DEFAULTS = { project: process.env['TS_NODE_PROJECT'], ignore: split(process.env['TS_NODE_IGNORE']), ignoreWarnings: split(process.env['TS_NODE_IGNORE_WARNINGS']), - typeCheck: yn(process.env['TS_NODE_FAST']) + typeCheck: yn(process.env['TS_NODE_TYPE_CHECK']) } /** @@ -272,7 +272,7 @@ export function register (options: Options = {}): Register { ) let getTypeInfo = function (_code: string, _fileName: string, _position: number): TypeInfo { - throw new TypeError(`No type information available under "--fast" mode`) + throw new TypeError(`Type information is unavailable without "--type-check"`) } // Use full language services when the fast option is disabled.