Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FAST environment variable to TYPE_CHECK #425

Merged
merged 1 commit into from
Sep 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
}

/**
Expand Down Expand Up @@ -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.
Expand Down