Creates a new Compiler instance
Array of file paths to compile
TypeScript compiler options (defaults to Compiler.DEFAULT_COMPILER_OPTIONS)
Optionalhost: CompilerHostCompiler host
OptionalcssLowering: CssLoweringOptionsReadonlydefaultDefault transformers for the compiler
ReadonlyfileArray of file paths to compile
Optional ReadonlyhostCompiler host
ReadonlyoptionsTypeScript compiler options
StaticDEFAULT_Default compiler options for the TypeScript compiler
Emits the compiled output
OptionaloutDir: stringOutput directory
An object containing the emit result and any diagnostics
StaticwithCreates a Compiler instance that uses a virtual filesystem
Array of file paths to compile
TypeScript compiler options
A Promise that resolves to a new Compiler instance
Compiler class for compiling TypeScript files
Remarks
This class provides functionality to compile TypeScript files using either the standard filesystem or a virtual filesystem (memfs).
Example