CompilerHost

Properties

Link copied to clipboard
abstract external val createHash: (data: String) -> String?
Link copied to clipboard
abstract external val directoryExists: (directoryName: String) -> Boolean?
Link copied to clipboard
abstract external val getCancellationToken: () -> CancellationToken?
Link copied to clipboard
abstract external val getCurrentDirectory: () -> String?
Link copied to clipboard
abstract external val getDefaultLibLocation: () -> String?
Link copied to clipboard
abstract external val getDirectories: (path: String) -> ReadonlyArray<String>?
Link copied to clipboard
abstract external val getEnvironmentVariable: (name: String) -> String??
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 getSourceFileByPath: (fileName: String, Path, languageVersionOrOptions: CompilerHostGetSourceFileByPathLanguageVersionOrOptions, onError: (message: String) -> Unit?, shouldCreateNewSourceFile: Boolean?) -> SourceFile??
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
Link copied to clipboard
abstract external val realpath: (path: String) -> String?

Resolve a symbolic link.

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?
Link copied to clipboard
abstract external var useCaseSensitiveFileNames: Any?
Link copied to clipboard
abstract external var writeFile: WriteFileCallback

Functions

Link copied to clipboard
abstract external fun fileExists(fileName: String): Boolean
Link copied to clipboard
abstract external fun getCanonicalFileName(fileName: String): String
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 getNewLine(): String
Link copied to clipboard
abstract external fun getSourceFile(fileName: String, languageVersionOrOptions: CreateSourceFileOptions, onError: (message: String) -> Unit = definedExternally, shouldCreateNewSourceFile: Boolean = definedExternally): SourceFile?
abstract external fun getSourceFile(fileName: String, languageVersionOrOptions: ScriptTarget, onError: (message: String) -> Unit = definedExternally, shouldCreateNewSourceFile: Boolean = definedExternally): SourceFile?
Link copied to clipboard
abstract external fun readFile(fileName: String): String?
Link copied to clipboard
abstract external fun useCaseSensitiveFileNames(): Boolean