import { TextEdit , WorkspaceEdit } from 'vscode-languageserver' ; import { TextEditAction } from '../common/editAction' ; export function convertTextEdits ( uri , editActions ) { if ( ! editActions ) { return { } ; } const edits = [ ] ; editActions . forEach ( ( editAction ) => { edits . push ( { range : editAction . range , newText : editAction . replacementText , } ) ; } ) ; return { changes : { [ uri ] : edits , } , } ; }