Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SolutionBuilderWithWatchHost<T>

Type parameters

Hierarchy

Index

Properties

createProgram

createProgram: CreateProgram<T>

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

reportDiagnostic

reportDiagnostic: DiagnosticReporter

reportSolutionBuilderStatus

reportSolutionBuilderStatus: DiagnosticReporter

Methods

Optional afterProgramEmitAndDiagnostics

  • afterProgramEmitAndDiagnostics(program: T): void

Optional clearTimeout

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

    Parameters

    • timeoutId: any

    Returns void

Optional createDirectory

  • createDirectory(path: string): void

Optional createHash

  • createHash(data: string): string

deleteFile

  • deleteFile(fileName: string): void

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

Optional getCustomTransformers

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

getModifiedTime

  • getModifiedTime(fileName: string): Date

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

setModifiedTime

  • setModifiedTime(fileName: string, date: Date): void

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

watchDirectory

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

    Parameters

    Returns FileWatcher

watchFile

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

    Parameters

    Returns FileWatcher

Optional writeFile

  • writeFile(path: string, data: string, writeByteOrderMark?: boolean): void
  • Should provide create directory and writeFile if done of invalidatedProjects is not invoked with writeFileCallback

    Parameters

    • path: string
    • data: string
    • Optional writeByteOrderMark: boolean

    Returns void

Generated using TypeDoc