Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WatchCompilerHost<T>

Type parameters

Hierarchy

Index

Properties

createProgram

createProgram: CreateProgram<T>

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

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

Optional createHash

  • createHash(data: string): string

Optional directoryExists

  • directoryExists(path: string): 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[]

Optional getEnvironmentVariable

  • getEnvironmentVariable(name: string): string

getNewLine

  • getNewLine(): string

Optional onWatchStatusChange

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

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

useCaseSensitiveFileNames

  • useCaseSensitiveFileNames(): boolean

Optional useSourceOfProjectReferenceRedirect

  • useSourceOfProjectReferenceRedirect(): boolean
  • Instead of using output d.ts file from project reference, use its source file

    Returns boolean

watchDirectory

watchFile

Generated using TypeDoc