Hierarchy

  • LanguageServiceDefaults

Index

Properties

Readonly onDidChange

onDidChange: IEvent<void>

Event fired when compiler options or diagnostics options are changed.

Readonly onDidExtraLibsChange

onDidExtraLibsChange: IEvent<void>

Event fired when extra libraries registered with the language service change.

Readonly workerOptions

workerOptions: WorkerOptions

Methods

addExtraLib

  • addExtraLib(content: string, filePath?: string): IDisposable
  • Add an additional source file to the language service. Use this for typescript (definition) files that won't be loaded as editor documents, like jquery.d.ts.

    Parameters

    • content: string

      The file content

    • Optional filePath: string

      An optional file path

    Returns IDisposable

    A disposable which will remove the file from the language service upon disposal.

getCompilerOptions

getDiagnosticsOptions

getEagerModelSync

  • getEagerModelSync(): boolean
  • Get the current setting for whether all existing models should be eagerly sync'd to the worker on start or restart.

    Returns boolean

getExtraLibs

setCompilerOptions

setDiagnosticsOptions

setEagerModelSync

  • setEagerModelSync(value: boolean): void
  • Configure if all existing models should be eagerly sync'd to the worker on start or restart.

    Parameters

    • value: boolean

    Returns void

setExtraLibs

  • setExtraLibs(libs: { content: string; filePath?: string }[]): void
  • Remove all existing extra libs and set the additional source files to the language service. Use this for typescript definition files that won't be loaded as editor documents, like jquery.d.ts.

    Parameters

    • libs: { content: string; filePath?: string }[]

      An array of entries to register.

    Returns void

setMaximumWorkerIdleTime

  • setMaximumWorkerIdleTime(value: number): void

setWorkerOptions