Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WatchCompilerHostOfFilesAndCompilerOptions<T>

Host to create watch with root files and options

Type parameters

Hierarchy

Index

Properties

createProgram

createProgram: CreateProgram<T>

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

options

Compiler options

Optional projectReferences

projectReferences: readonly ProjectReference[]

Project References

rootFiles

rootFiles: string[]

root files to use to generate program

Optional watchOptions

watchOptions: WatchOptions

Methods

Optional afterProgramCreate

  • afterProgramCreate(program: T): void
  • If provided, callback to invoke after every new program creation

    Parameters

    • program: T

    Returns void

Optional clearTimeout

  • clearTimeout(timeoutId: any): void
  • If provided, will be used to reset existing delayed compilation

    Parameters

    • timeoutId: any

    Returns void

Optional createHash

  • createHash(data: string): string
  • Parameters

    • data: string

    Returns string

Optional directoryExists

  • directoryExists(path: string): boolean
  • If provided, used for module resolution as well as to handle directory structure

    Parameters

    • path: string

    Returns boolean

fileExists

  • 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

    Parameters

    • path: string

    Returns boolean

getCurrentDirectory

  • getCurrentDirectory(): string

getDefaultLibFileName

Optional getDefaultLibLocation

  • getDefaultLibLocation(): string

Optional getDirectories

  • getDirectories(path: string): string[]
  • If provided, used in resolutions as well as handling directory structure

    Parameters

    • path: string

    Returns string[]

Optional getEnvironmentVariable

  • getEnvironmentVariable(name: string): string
  • If provided is used to get the environment variable

    Parameters

    • name: string

    Returns string

getNewLine

  • getNewLine(): string

Optional getParsedCommandLine

Optional onWatchStatusChange

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

    Parameters

    Returns void

Optional readDirectory

  • readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]
  • If provided, used to cache and handle directory structure modifications

    Parameters

    • path: string
    • Optional extensions: readonly string[]
    • Optional exclude: readonly string[]
    • Optional include: readonly string[]
    • Optional depth: number

    Returns string[]

readFile

  • readFile(path: string, encoding?: string): 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

    Parameters

    • path: string
    • Optional encoding: string

    Returns string

Optional realpath

  • realpath(path: string): string
  • Symbol links resolution

    Parameters

    • path: string

    Returns string

Optional resolveModuleNames

Optional resolveTypeReferenceDirectives

Optional setTimeout

  • setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any
  • If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together

    Parameters

    • callback: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • ms: number
    • Rest ...args: any[]

    Returns any

Optional trace

  • trace(s: string): void
  • If provided would be used to write log about compilation

    Parameters

    • s: string

    Returns void

useCaseSensitiveFileNames

  • useCaseSensitiveFileNames(): boolean

Optional useSourceOfProjectReferenceRedirect

  • useSourceOfProjectReferenceRedirect(): boolean

watchDirectory

watchFile

Generated using TypeDoc