Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ProgramHost<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 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
  • Returns string

getDefaultLibFileName

  • Parameters

    Returns string

Optional getDefaultLibLocation

  • getDefaultLibLocation(): string
  • Returns 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
  • Returns string

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

  • If provided, used to resolve the module names, otherwise typescript's default module resolution

    Parameters

    Returns ResolvedModule[]

Optional resolveTypeReferenceDirectives

Optional trace

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

    Parameters

    • s: string

    Returns void

useCaseSensitiveFileNames

  • useCaseSensitiveFileNames(): boolean
  • Returns boolean

Generated using TypeDoc