@@ -107,6 +107,7 @@ declare namespace ts {
107
107
GetApplicableRefactors = "getApplicableRefactors",
108
108
GetEditsForRefactor = "getEditsForRefactor",
109
109
GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions",
110
+ PreparePasteEdits = "preparePasteEdits",
110
111
GetPasteEdits = "getPasteEdits",
111
112
OrganizeImports = "organizeImports",
112
113
GetEditsForFileRename = "getEditsForFileRename",
@@ -514,6 +515,19 @@ declare namespace ts {
514
515
files: string[];
515
516
};
516
517
}
518
+ /**
519
+ * Request to check if `pasteEdits` should be provided for a given location post copying text from that location.
520
+ */
521
+ export interface PreparePasteEditsRequest extends FileRequest {
522
+ command: CommandTypes.PreparePasteEdits;
523
+ arguments: PreparePasteEditsRequestArgs;
524
+ }
525
+ export interface PreparePasteEditsRequestArgs extends FileRequestArgs {
526
+ copiedTextSpan: TextSpan[];
527
+ }
528
+ export interface PreparePasteEditsResponse extends Response {
529
+ body: boolean;
530
+ }
517
531
/**
518
532
* Request refactorings at a given position post pasting text from some other location.
519
533
*/
@@ -3556,6 +3570,7 @@ declare namespace ts {
3556
3570
private getApplicableRefactors;
3557
3571
private getEditsForRefactor;
3558
3572
private getMoveToRefactoringFileSuggestions;
3573
+ private preparePasteEdits;
3559
3574
private getPasteEdits;
3560
3575
private organizeImports;
3561
3576
private getEditsForFileRename;
@@ -10211,6 +10226,7 @@ declare namespace ts {
10211
10226
uncommentSelection(fileName: string, textRange: TextRange): TextChange[];
10212
10227
getSupportedCodeFixes(fileName?: string): readonly string[];
10213
10228
dispose(): void;
10229
+ preparePasteEditsForFile(fileName: string, copiedTextRanges: TextRange[]): boolean;
10214
10230
getPasteEdits(args: PasteEditsArgs, formatOptions: FormatCodeSettings): PasteEdits;
10215
10231
}
10216
10232
interface JsxClosingTagInfo {
0 commit comments