Skip to main content
Module

x/ts_morph/mod.ts>LanguageService#getCodeFixesAtPosition

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method LanguageService.prototype.getCodeFixesAtPosition
import { LanguageService } from "https://deno.land/x/ts_morph@15.1.0/mod.ts";

Gets the edit information for applying a code fix at the provided text range in a source file.

Parameters

filePathOrSourceFile: string | SourceFile
  • File path or source file to get the code fixes for.
start: number
  • Start position of the text range to be fixed.
end: number
  • End position of the text range to be fixed.
errorCodes: ReadonlyArray<number>
  • One or more error codes associated with the code fixes to retrieve.
optional
formatOptions: FormatCodeSettings
  • Format code settings.
optional
preferences: UserPreferences
  • User preferences for refactoring.