Options for registering a TypeScript compiler instance globally.
Specify a custom TypeScript compiler.
Use TypeScript's compiler host API instead of the language service API.
JSON object to merge with TypeScript
Behave as if invoked within this working directory. Roughly equivalent to
cd $dir && ts-node ...
Legacy alias for
Emit output files into
Allows the usage of top level await in REPL.
Uses node's implementation which accomplishes this with an AST syntax transformation.
Enabled by default when tsconfig target is es2018 or above. Set to false to disable.
Note: setting to
true when tsconfig target is too low will throw an Error. Leave as
to get default, automatic behavior.
Load "files" and "include" from
tsconfig.json on startup.
Default is to override
tsconfig.json "files" and "include" to only include the entrypoint script.
Paths which should not be compiled.
Each string in the array is converted to a regular expression via
new RegExp() and tested against source paths prior to compilation.
Source paths are normalized to posix-style separators, relative to the directory containing
tsconfig.json or to cwd if no
tsconfig.json is loaded.
Default is to ignore all node_modules subdirectories.
Ignore TypeScript warnings by diagnostic code.
Logs TypeScript errors to stderr instead of throwing exceptions.
Override certain paths to be compiled and executed as CommonJS or ECMAScript modules. When overridden, the tsconfig "module" and package.json "type" fields are overridden. This is useful because TypeScript files cannot use the .cjs nor .mjs file extensions; it achieves the same effect.
Each key is a glob pattern following the same rules as tsconfig's "include" array. When multiple patterns match the same file, the last pattern takes precedence.
cjs overrides matches files to compile and execute as CommonJS.
esm overrides matches files to compile and execute as native ECMAScript modules.
package overrides either of the above to default behavior, which obeys package.json "type" and
tsconfig.json "module" options.
Re-order file extensions so that TypeScript imports are preferred.
For example, when both
index.ts exist, enabling this option causes
require('./index') to resolve to
index.ts instead of
Use pretty diagnostic formatter.
Path to TypeScript config file or directory containing a
Similar to the
tsc --project flag: https://www.typescriptlang.org/docs/handbook/compiler-options.html
Search for TypeScript config file (
tsconfig.json) in this or parent directories.
Modules to require, like node's
If specified in
tsconfig.json, the modules will be resolved relative to the
If specified programmatically, each input string should be pre-resolved to an absolute path for best results.
Scope compiler to files within
Skip ignore check, so that compilation will be attempted for all files with matching extensions.
Skip project config resolution and loading.
Use TypeScript's faster
Specify a custom transpiler for use with transpileOnly
DEPRECATED Specify type-check is enabled (e.g.
transpileOnly == false).
Generated using TypeDoc