Properties

Link copied to clipboard
abstract external val afterProgramEmitAndDiagnostics: (program: T) -> Unit?
Link copied to clipboard
abstract external val createDirectory: (path: String) -> Unit?
Link copied to clipboard
abstract external val createHash: (data: String) -> String?
Link copied to clipboard
abstract external var createProgram: CreateProgram<T>

Used to create the program when need for program creation or recreation detected

Link copied to clipboard
abstract external val directoryExists: (path: String) -> Boolean?

If provided, used for module resolution as well as to handle directory structure

Link copied to clipboard
abstract external var getCustomTransformers: (project: String) -> CustomTransformers??
Link copied to clipboard
abstract external val getDefaultLibLocation: () -> String?
Link copied to clipboard
abstract external val getDirectories: (path: String) -> ReadonlyArray<String>?

If provided, used in resolutions as well as handling directory structure

Link copied to clipboard
abstract external val getEnvironmentVariable: (name: String) -> String??

If provided is used to get the environment variable

Link copied to clipboard
abstract external val getModuleResolutionCache: () -> ModuleResolutionCache??

Returns the module resolution cache used by a provided resolveModuleNames implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it

Link copied to clipboard
abstract external val getParsedCommandLine: (fileName: String) -> ParsedCommandLine??
Link copied to clipboard
abstract external val hasInvalidatedResolutions: (Path) -> Boolean?

If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives

Link copied to clipboard
abstract external var jsDocParsingMode: JSDocParsingMode?
Link copied to clipboard

If provided, used to cache and handle directory structure modifications

Link copied to clipboard
abstract external val realpath: (path: String) -> String?

Symbol links resolution

Link copied to clipboard
abstract external var reportDiagnostic: DiagnosticReporter
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract external val resolveModuleNames: (ReadonlyArray<String>, containingFile: String, ReadonlyArray<String>?, redirectedReference: ResolvedProjectReference?, options: CompilerOptions, containingSourceFile: SourceFile?) -> ReadonlyArray<ResolvedModule?>?
Link copied to clipboard
abstract external val resolveTypeReferenceDirectives: (typeReferenceDirectiveNames: Any, containingFile: String, redirectedReference: ResolvedProjectReference?, options: CompilerOptions, ResolutionMode) -> ReadonlyArray<ResolvedTypeReferenceDirective?>?
Link copied to clipboard
abstract external val trace: (s: String) -> Unit?

If provided would be used to write log about compilation

Link copied to clipboard
abstract external val writeFile: (path: String, data: String, writeByteOrderMark: Boolean?) -> Unit?

Should provide create directory and writeFile if done of invalidatedProjects is not invoked with writeFileCallback

Functions

Link copied to clipboard
abstract external fun deleteFile(fileName: String)
Link copied to clipboard
abstract external fun fileExists(path: String): Boolean

Use to check file presence for source files and if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well

Link copied to clipboard
abstract external fun getCurrentDirectory(): String
Link copied to clipboard
abstract external fun getDefaultLibFileName(options: CompilerOptions): String
Link copied to clipboard
abstract external fun getModifiedTime(fileName: String): Date?
Link copied to clipboard
abstract external fun getNewLine(): String
Link copied to clipboard
abstract external fun readFile(path: String, encoding: String = definedExternally): String?

Use to read file text for source files and if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well

Link copied to clipboard
abstract external fun setModifiedTime(fileName: String, date: Date)
Link copied to clipboard
abstract external fun useCaseSensitiveFileNames(): Boolean