Compiles the TypeScript project at the specified path.
The path to the TypeScript project.
The current working directory.
Registers a hook for the TypeScript project at the specified path.
The path to the TypeScript project.
The current working directory.
OptionalcheckDiagnostics: boolean
Optional flag requesting that the hook validate the project
(equivalent to a tsc --noEmit pass) and throw if it has type errors, instead of the
caller running that check separately.
OptionaltsconfigOverrides: { [key: string]: any }
Optional compiler options that override whatever the loaded
project file (projectPath) specifies for those same keys.
OptionalhookOptions: ICompileHookOptionsTranspiles the specified TypeScript file.
The path to the TypeScript file.
The source code of the TypeScript file.
The current working directory.
OptionalgenerateMap: boolean
Optional flag to indicate if a source map should be generated.
OptionalprojectPath: string
Optional TypeScript project file to use for program-aware transpilation.
The transpiled JavaScript code.
Abstraction over TypeScript compilation and transpilation so that the default TypeScript provider can be swapped for a custom one (e.g. esbuild, swc, babel).
Since
0.2.0