Optionalts-Optionalcompiler?: stringSpecify a custom TypeScript compiler.
OptionalcompilerHost?: booleanUse TypeScript's compiler host API instead of the language service API.
OptionalcompilerOptions?: {JSON object to merge with TypeScript compilerOptions.
Optionalemit?: booleanEmit output files into .ts-node directory.
Optionalesm?: booleanEnable native ESM support.
For details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules
OptionalexperimentalReplAwait?: booleanAllows 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 undefined
to get default, automatic behavior.
OptionalexperimentalResolver?: booleanEnable experimental features that re-map imports and require calls to support:
baseUrl, paths, rootDirs, .js to .ts file extension mappings,
outDir to rootDir mappings for composite projects and monorepos.
For details, see https://github.com/TypeStrong/ts-node/issues/1514
OptionalexperimentalSpecifierResolution?: "node" | "explicit"Like node's --experimental-specifier-resolution, , but can also be set in your tsconfig.json for convenience.
For details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm
Optionalfiles?: booleanLoad "files" and "include" from tsconfig.json on startup.
Default is to override tsconfig.json "files" and "include" to only include the entrypoint script.
Optionalignore?: string[]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.
OptionalignoreDiagnostics?: (string | number)[]Ignore TypeScript warnings by diagnostic code.
OptionallogError?: booleanLogs TypeScript errors to stderr instead of throwing exceptions.
OptionalmoduleTypes?: TsNodeModuleTypesOptionalpreferTsExts?: booleanRe-order file extensions so that TypeScript imports are preferred.
For example, when both index.js and index.ts exist, enabling this option causes require('./index') to resolve to index.ts instead of index.js
Optionalpretty?: booleanUse pretty diagnostic formatter.
Optionalrequire?: string[]Modules to require, like node's --require flag.
If specified in tsconfig.json, the modules will be resolved relative to the tsconfig.json file.
If specified programmatically, each input string should be pre-resolved to an absolute path for best results.
Optionalscope?: booleanScope compiler to files within scopeDir.
OptionalscopeDir?: stringOptionalskipIgnore?: booleanSkip ignore check, so that compilation will be attempted for all files with matching extensions.
Optionalswc?: booleanTranspile with swc instead of the TypeScript compiler, and skip typechecking.
Equivalent to setting both transpileOnly: true and transpiler: 'ts-node/transpilers/swc'
For complete instructions: https://typestrong.org/ts-node/docs/transpilers
OptionaltranspileOnly?: booleanUse TypeScript's faster transpileModule.
Optionaltranspiler?: string | [string, { [k: string]: unknown }]Specify a custom transpiler for use with transpileOnly
OptionaltypeCheck?: booleanDEPRECATED Specify type-check is enabled (e.g. transpileOnly == false).
ts-node options. See also: https://typestrong.org/ts-node/docs/configuration
ts-node offers TypeScript execution and REPL for node.js, with source map support.