Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno2node/src/deps.deno.ts>LanguageService#getEditsForRefactor

Compile your Deno project to run on Node.js.
Go to Latest
method LanguageService.prototype.getEditsForRefactor
import { LanguageService } from "https://deno.land/x/deno2node@v1.10.0/src/deps.deno.ts";

Gets the edit information for applying a refactor at a the provided position in a source file.

Parameters

filePathOrSourceFile: string | SourceFile
  • File path or source file to get the edits for.
formatSettings: FormatCodeSettings
  • Fomat code settings.
positionOrRange: number | { getPos(): number; getEnd(): number; }
  • Position in the source file where to apply given refactor.
refactorName: string
  • Refactor name.
actionName: string
  • Refactor action name.
optional
preferences: UserPreferences
  • User preferences for refactoring.