Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CompilerHost

CompilerHost implementation

Hierarchy

Implements

Index

Constructors

constructor

Properties

componentName

componentName: string

The name of this component as set by the @Component decorator.

Private currentDirectory

currentDirectory: string

The full path of the current directory. Result cache of getCurrentDirectory.

Accessors

application

owner

Methods

Protected bubble

directoryExists

  • directoryExists(directoryName: string): boolean
  • Check whether the given directory exists.

    Implementation of ts.CompilerHost.directoryExists(directoryName)

    Parameters

    • directoryName: string

    Returns boolean

fileExists

  • fileExists(fileName: string): boolean
  • Check whether the given file exists.

    Implementation of ts.CompilerHost.fileExists(fileName)

    Parameters

    • fileName: string

    Returns boolean

getCanonicalFileName

  • getCanonicalFileName(fileName: string): string
  • Return the canonical file name of the given file.

    Implementation of ts.CompilerHost.getCanonicalFileName()

    Parameters

    • fileName: string

      The file name whose canonical variant should be resolved.

    Returns string

    The canonical file name of the given file.

getCurrentDirectory

  • getCurrentDirectory(): string
  • Return the full path of the current directory.

    Implementation of ts.CompilerHost.getCurrentDirectory()

    Returns string

    The full path of the current directory.

getDefaultLibFileName

  • getDefaultLibFileName(options: CompilerOptions): string
  • Return the full path of the default library that should be used.

    Implementation of ts.CompilerHost.getDefaultLibFilename()

    Parameters

    • options: CompilerOptions

    Returns string

    The full path of the default library.

getDirectories

  • getDirectories(path: string): string[]

getNewLine

  • getNewLine(): string
  • Return the new line char sequence of the current platform.

    Implementation of ts.CompilerHost.getNewLine()

    Returns string

    The new line char sequence of the current platform.

getOptionDeclarations

getSourceFile

  • getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: function): SourceFile
  • Return an instance of ts.SourceFile representing the given file.

    Implementation of ts.CompilerHost.getSourceFile()

    Parameters

    • filename: string

      The path and name of the file that should be loaded.

    • languageVersion: ScriptTarget

      The script target the file should be interpreted with.

    • Optional onError: function

      A callback that will be invoked if an error occurs.

        • (message: string): void
        • Parameters

          • message: string

          Returns void

    Returns SourceFile

    An instance of ts.SourceFile representing the given file.

Protected initialize

  • initialize(): void

listenTo

listenToOnce

off

  • off(): any
  • off(eventMap: EventMap, context?: any): any
  • off(name: string, callback?: EventCallback, context?: any): any

on

  • on(eventMap: EventMap, context?: any): any
  • on(eventMap: EventMap, callback?: EventCallback, context?: any, priority?: number): any
  • on(name: string, callback: EventCallback, context?: any, priority?: number): any

once

  • once(eventMap: EventMap, context?: any): any
  • once(name: string, callback: EventCallback, context?: any, priority?: any): any
  • Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.

    Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns any

  • Parameters

    • name: string
    • callback: EventCallback
    • Optional context: any
    • Optional priority: any

    Returns any

readFile

  • readFile(fileName: string): string
  • Return the contents of the given file.

    Implementation of ts.CompilerHost.readFile(fileName)

    Parameters

    • fileName: string

    Returns string

stopListening

trigger

  • Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as trigger is, apart from the event name (unless you're listening on "all", which will cause your callback to receive the true name of the event as the first argument).

    Parameters

    Returns this

useCaseSensitiveFileNames

  • useCaseSensitiveFileNames(): boolean
  • Return whether file names are case sensitive on the current platform or not.

    Implementation of ts.CompilerHost.useCaseSensitiveFileNames()

    Returns boolean

    TRUE if file names are case sensitive on the current platform, FALSE otherwise.

writeFile

  • writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: function): void
  • Write a compiled javascript file to disc.

    As TypeDoc will not emit compiled javascript files this is a null operation.

    Implementation of ts.CompilerHost.writeFile()

    Parameters

    • fileName: string

      The name of the file that should be written.

    • data: string

      The contents of the file.

    • writeByteOrderMark: boolean

      Whether the UTF-8 BOM should be written or not.

    • Optional onError: function

      A callback that will be invoked if an error occurs.

        • (message: string): void
        • Parameters

          • message: string

          Returns void

    Returns void

Generated using TypeDoc