interface TypeScriptWorker {
    findRenameLocations(fileName, positon, findInStrings, findInComments, providePrefixAndSuffixTextForRename): Promise<readonly any[]>;
    getCodeFixesAtPosition(fileName, start, end, errorCodes, formatOptions): Promise<readonly any[]>;
    getCompilerOptionsDiagnostics(fileName): Promise<Diagnostic[]>;
    getCompletionEntryDetails(fileName, position, entry): Promise<any>;
    getCompletionsAtPosition(fileName, position): Promise<any>;
    getDefinitionAtPosition(fileName, position): Promise<readonly any[]>;
    getDocumentHighlights(fileName, position, filesToSearch): Promise<readonly any[]>;
    getEmitOutput(fileName, emitOnlyDtsFiles?, forceDtsEmit?): Promise<EmitOutput>;
    getFormattingEditsAfterKeystroke(fileName, postion, ch, options): Promise<any[]>;
    getFormattingEditsForDocument(fileName, options): Promise<any[]>;
    getFormattingEditsForRange(fileName, start, end, options): Promise<any[]>;
    getNavigationTree(fileName): Promise<any>;
    getQuickInfoAtPosition(fileName, position): Promise<any>;
    getReferencesAtPosition(fileName, position): Promise<any[]>;
    getRenameInfo(fileName, positon, options): Promise<any>;
    getScriptText(fileName): Promise<string>;
    getSemanticDiagnostics(fileName): Promise<Diagnostic[]>;
    getSignatureHelpItems(fileName, position, options): Promise<any>;
    getSuggestionDiagnostics(fileName): Promise<Diagnostic[]>;
    getSyntacticDiagnostics(fileName): Promise<Diagnostic[]>;
    provideInlayHints(fileName, start, end): Promise<readonly any[]>;
}

Methods

  • Get other occurrences which should be updated when renaming the item at the given file and position.

    Parameters

    • fileName: string
    • positon: number
    • findInStrings: boolean
    • findInComments: boolean
    • providePrefixAndSuffixTextForRename: boolean

    Returns Promise<readonly any[]>

    Promise<readonly typescript.RenameLocation[] | undefined>

  • Get possible code fixes at the given position in the file.

    Parameters

    • fileName: string
    • start: number
    • end: number
    • errorCodes: number[]
    • formatOptions: any

      typescript.FormatCodeOptions

    Returns Promise<readonly any[]>

    Promise<ReadonlyArray<typescript.CodeFixAction>>

  • Get diagnostic messages related to the current compiler options.

    Parameters

    • fileName: string

      Not used

    Returns Promise<Diagnostic[]>

  • Get code completion details for the given file, position, and entry.

    Parameters

    • fileName: string
    • position: number
    • entry: string

    Returns Promise<any>

    Promise<typescript.CompletionEntryDetails | undefined>

  • Get code completions for the given file and position.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<any>

    Promise<typescript.CompletionInfo | undefined>

  • Get the definition of the item at the given position in the file.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<readonly any[]>

    Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>

  • Parameters

    • fileName: string
    • position: number
    • filesToSearch: string[]

    Returns Promise<readonly any[]>

  • Get transpiled output for the given file.

    Parameters

    • fileName: string
    • Optional emitOnlyDtsFiles: boolean
    • Optional forceDtsEmit: boolean

    Returns Promise<EmitOutput>

    typescript.EmitOutput

  • Get formatting changes which should be applied after the given keystroke.

    Parameters

    • fileName: string
    • postion: number
    • ch: string
    • options: any

      typescript.FormatCodeOptions

    Returns Promise<any[]>

    Promise<typescript.TextChange[]>

  • Get changes which should be applied to format the given file.

    Parameters

    • fileName: string
    • options: any

      typescript.FormatCodeOptions

    Returns Promise<any[]>

    Promise<typescript.TextChange[]>

  • Get changes which should be applied to format the given range in the file.

    Parameters

    • fileName: string
    • start: number
    • end: number
    • options: any

      typescript.FormatCodeOptions

    Returns Promise<any[]>

    Promise<typescript.TextChange[]>

  • Get outline entries for the item at the given position in the file.

    Parameters

    • fileName: string

    Returns Promise<any>

    Promise<typescript.NavigationTree | undefined>

  • Get quick info for the item at the given position in the file.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<any>

    Promise<typescript.QuickInfo | undefined>

  • Get references to the item at the given position in the file.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<any[]>

    Promise<typescript.ReferenceEntry[] | undefined>

  • Get edits which should be applied to rename the item at the given file and position (or a failure reason).

    Parameters

    • fileName: string
    • positon: number
    • options: any

      typescript.RenameInfoOptions

    Returns Promise<any>

    Promise<typescript.RenameInfo>

  • Get the content of a given file.

    Parameters

    • fileName: string

    Returns Promise<string>

  • Get diagnostic messages for any semantic issues in the given file.

    Parameters

    • fileName: string

    Returns Promise<Diagnostic[]>

  • Get signature help items for the item at the given file and position.

    Parameters

    • fileName: string
    • position: number
    • options: any

    Returns Promise<any>

    Promise<typescript.SignatureHelpItems | undefined>

  • Get diagnostic messages for any suggestions related to the given file.

    Parameters

    • fileName: string

    Returns Promise<Diagnostic[]>

  • Get diagnostic messages for any syntax issues in the given file.

    Parameters

    • fileName: string

    Returns Promise<Diagnostic[]>

  • Get inlay hints in the range of the file.

    Parameters

    • fileName: string
    • start: number
    • end: number

    Returns Promise<readonly any[]>

    Promise<typescript.InlayHint[]>