Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TypeScriptWorker

Hierarchy

  • TypeScriptWorker

Index

Methods

findRenameLocations

  • findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>
  • 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[] | undefined>

    Promise<readonly typescript.RenameLocation[] | undefined>

getCodeFixesAtPosition

  • getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>
  • 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<ReadonlyArray<any>>

    Promise<ReadonlyArray<typescript.CodeFixAction>>

getCompilerOptionsDiagnostics

  • getCompilerOptionsDiagnostics(fileName: string): Promise<Diagnostic[]>
  • Get diagnostic messages related to the current compiler options.

    Parameters

    • fileName: string

      Not used

    Returns Promise<Diagnostic[]>

getCompletionEntryDetails

  • getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>
  • Get code completion details for the given file, position, and entry.

    Parameters

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

    Returns Promise<any | undefined>

    Promise<typescript.CompletionEntryDetails | undefined>

getCompletionsAtPosition

  • getCompletionsAtPosition(fileName: string, position: number): Promise<any | undefined>
  • Get code completions for the given file and position.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<any | undefined>

    Promise<typescript.CompletionInfo | undefined>

getDefinitionAtPosition

  • getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>
  • Get the definition of the item at the given position in the file.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<ReadonlyArray<any> | undefined>

    Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>

getEmitOutput

  • getEmitOutput(fileName: string): Promise<EmitOutput>
  • Get transpiled output for the given file.

    Parameters

    • fileName: string

    Returns Promise<EmitOutput>

    typescript.EmitOutput

getFormattingEditsAfterKeystroke

  • getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>
  • 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[]>

getFormattingEditsForDocument

  • getFormattingEditsForDocument(fileName: string, options: any): Promise<any[]>
  • Get changes which should be applied to format the given file.

    Parameters

    • fileName: string
    • options: any

      typescript.FormatCodeOptions

    Returns Promise<any[]>

    Promise<typescript.TextChange[]>

getFormattingEditsForRange

  • getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>
  • 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[]>

getNavigationBarItems

  • getNavigationBarItems(fileName: string): Promise<any[]>
  • Get outline entries for the item at the given position in the file.

    Parameters

    • fileName: string

    Returns Promise<any[]>

    Promise<typescript.NavigationBarItem[]>

getOccurrencesAtPosition

  • getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>
  • Get other ranges which are related to the item at the given position in the file (often used for highlighting).

    Parameters

    • fileName: string
    • position: number

    Returns Promise<ReadonlyArray<any> | undefined>

    Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>

getQuickInfoAtPosition

  • getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>
  • Get quick info for the item at the given position in the file.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<any | undefined>

    Promise<typescript.QuickInfo | undefined>

getReferencesAtPosition

  • getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>
  • Get references to the item at the given position in the file.

    Parameters

    • fileName: string
    • position: number

    Returns Promise<any[] | undefined>

    Promise<typescript.ReferenceEntry[] | undefined>

getRenameInfo

  • getRenameInfo(fileName: string, positon: number, options: any): Promise<any>
  • 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>

getScriptText

  • getScriptText(fileName: string): Promise<string | undefined>
  • Get the content of a given file.

    Parameters

    • fileName: string

    Returns Promise<string | undefined>

getSemanticDiagnostics

  • getSemanticDiagnostics(fileName: string): Promise<Diagnostic[]>
  • Get diagnostic messages for any semantic issues in the given file.

    Parameters

    • fileName: string

    Returns Promise<Diagnostic[]>

getSignatureHelpItems

  • getSignatureHelpItems(fileName: string, position: number, options: any): Promise<any | undefined>
  • Get signature help items for the item at the given file and position.

    Parameters

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

    Returns Promise<any | undefined>

    Promise<typescript.SignatureHelpItems | undefined>

getSuggestionDiagnostics

  • getSuggestionDiagnostics(fileName: string): Promise<Diagnostic[]>
  • Get diagnostic messages for any suggestions related to the given file.

    Parameters

    • fileName: string

    Returns Promise<Diagnostic[]>

getSyntacticDiagnostics

  • getSyntacticDiagnostics(fileName: string): Promise<Diagnostic[]>
  • Get diagnostic messages for any syntax issues in the given file.

    Parameters

    • fileName: string

    Returns Promise<Diagnostic[]>

Generated using TypeDoc