WatchHost

sealed external interface WatchHost(source)

Host that has watch functionality used in --watch mode

Inheritors

Properties

Link copied to clipboard
abstract val clearTimeout: (timeoutId: Any?) -> Unit?

If provided, will be used to reset existing delayed compilation

Link copied to clipboard
abstract val onWatchStatusChange: (diagnostic: Diagnostic, newLine: String, options: CompilerOptions, errorCount: Double?) -> Unit?

If provided, called with Diagnostic message that informs about change in watch status

Link copied to clipboard
Link copied to clipboard
abstract val setTimeout: Function<Any?>?

If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together

Functions

Link copied to clipboard
abstract fun watchDirectory(    path: String,     callback: DirectoryWatcherCallback,     recursive: Boolean = definedExternally,     options: WatchOptions = definedExternally): FileWatcher

Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added

Link copied to clipboard
abstract fun watchFile(    path: String,     callback: FileWatcherCallback,     pollingInterval: Double = definedExternally,     options: WatchOptions = definedExternally): FileWatcher

Used to watch changes in source files, missing files needed to update the program or config file