Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LanguageServiceDefaults

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

  • Get current TypeScript compiler options for the language service.

    Returns CompilerOptions

getDiagnosticsOptions

  • Get the current diagnostics options for the language service.

    Returns DiagnosticsOptions

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

  • Get the current extra libs registered with the language service.

    Returns IExtraLibs

setCompilerOptions

  • Set TypeScript compiler options.

    Parameters

    Returns void

setDiagnosticsOptions

  • Configure whether syntactic and/or semantic validation should be performed

    Parameters

    Returns void

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
  • No-op.

    Parameters

    • value: number

    Returns void

setWorkerOptions

  • Configure webworker options

    Parameters

    Returns void

Generated using TypeDoc