interface LanguageServiceDefaults {
    inlayHintsOptions: InlayHintsOptions;
    modeConfiguration: languages.typescript.ModeConfiguration;
    onDidChange: IEvent<void>;
    onDidExtraLibsChange: IEvent<void>;
    workerOptions: WorkerOptions;
    addExtraLib(content, filePath?): IDisposable;
    getCompilerOptions(): CompilerOptions;
    getDiagnosticsOptions(): languages.typescript.DiagnosticsOptions;
    getEagerModelSync(): boolean;
    getExtraLibs(): IExtraLibs;
    setCompilerOptions(options): void;
    setDiagnosticsOptions(options): void;
    setEagerModelSync(value): void;
    setExtraLibs(libs): void;
    setInlayHintsOptions(options): void;
    setMaximumWorkerIdleTime(value): void;
    setModeConfiguration(modeConfiguration): void;
    setWorkerOptions(options): void;
}

Properties

inlayHintsOptions: InlayHintsOptions
onDidChange: IEvent<void>

Event fired when compiler options or diagnostics options are changed.

onDidExtraLibsChange: IEvent<void>

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

workerOptions: WorkerOptions

Methods

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

  • Get current TypeScript compiler options for the language service.

    Returns CompilerOptions

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

    Returns boolean

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

    Returns IExtraLibs

  • Set TypeScript compiler options.

    Parameters

    Returns void

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

    Returns void

  • Configure if all existing models should be eagerly sync'd to the worker on start or restart.

    Parameters

    • value: boolean

    Returns 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

  • Configure inlay hints options.

    Parameters

    Returns void

  • No-op.

    Parameters

    • value: number

    Returns void

  • Configure webworker options

    Parameters

    Returns void