CompilerHost

sealed external interface CompilerHost : ModuleResolutionHost(source)

Properties

Link copied to clipboard
abstract val createHash: (data: String) -> String?
Link copied to clipboard
abstract val directoryExists: (directoryName: String) -> Boolean?
Link copied to clipboard
Link copied to clipboard
abstract val getCurrentDirectory: () -> String?
Link copied to clipboard
abstract val getDefaultLibLocation: () -> String?
Link copied to clipboard
abstract val getDirectories: (path: String) -> ReadonlyArray<String>?
Link copied to clipboard
abstract val getEnvironmentVariable: (name: String) -> String??
Link copied to clipboard

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 val getParsedCommandLine: (fileName: String) -> ParsedCommandLine??
Link copied to clipboard
abstract val getSourceFileByPath: (fileName: String, Path, languageVersionOrOptions: CompilerHostGetSourceFileByPathLanguageVersionOrOptions, onError: (message: String) -> Unit?, shouldCreateNewSourceFile: Boolean?) -> SourceFile??
Link copied to clipboard

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
Link copied to clipboard
Link copied to clipboard
abstract val realpath: (path: String) -> String?

Resolve a symbolic link.

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

Functions

Link copied to clipboard
abstract fun fileExists(fileName: String): Boolean
Link copied to clipboard
abstract fun getCanonicalFileName(fileName: String): String
Link copied to clipboard
abstract fun getCurrentDirectory(): String
Link copied to clipboard
Link copied to clipboard
abstract fun getNewLine(): String
Link copied to clipboard
abstract fun getSourceFile(fileName: String, languageVersionOrOptions: CreateSourceFileOptions, onError: (message: String) -> Unit = definedExternally, shouldCreateNewSourceFile: Boolean = definedExternally): SourceFile?
abstract fun getSourceFile(fileName: String, languageVersionOrOptions: ScriptTarget, onError: (message: String) -> Unit = definedExternally, shouldCreateNewSourceFile: Boolean = definedExternally): SourceFile?
Link copied to clipboard
abstract fun readFile(fileName: String): String?
Link copied to clipboard