typescript 5.5.0-dev.20240522 → 5.5.0-dev.20240524

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -121,6 +121,7 @@ declare namespace ts {
121
121
  ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls",
122
122
  ProvideInlayHints = "provideInlayHints",
123
123
  WatchChange = "watchChange",
124
+ MapCode = "mapCode",
124
125
  }
125
126
  /**
126
127
  * A TypeScript Server message
@@ -1769,6 +1770,33 @@ declare namespace ts {
1769
1770
  export interface InlayHintsResponse extends Response {
1770
1771
  body?: InlayHintItem[];
1771
1772
  }
1773
+ export interface MapCodeRequestArgs extends FileRequestArgs {
1774
+ /**
1775
+ * The files and changes to try and apply/map.
1776
+ */
1777
+ mapping: MapCodeRequestDocumentMapping;
1778
+ }
1779
+ export interface MapCodeRequestDocumentMapping {
1780
+ /**
1781
+ * The specific code to map/insert/replace in the file.
1782
+ */
1783
+ contents: string[];
1784
+ /**
1785
+ * Areas of "focus" to inform the code mapper with. For example, cursor
1786
+ * location, current selection, viewport, etc. Nested arrays denote
1787
+ * priority: toplevel arrays are more important than inner arrays, and
1788
+ * inner array priorities are based on items within that array. Items
1789
+ * earlier in the arrays have higher priority.
1790
+ */
1791
+ focusLocations?: TextSpan[][];
1792
+ }
1793
+ export interface MapCodeRequest extends FileRequest {
1794
+ command: CommandTypes.MapCode;
1795
+ arguments: MapCodeRequestArgs;
1796
+ }
1797
+ export interface MapCodeResponse extends Response {
1798
+ body: readonly FileCodeEdits[];
1799
+ }
1772
1800
  /**
1773
1801
  * Synchronous request for semantic diagnostics of one file.
1774
1802
  */
@@ -3468,6 +3496,7 @@ declare namespace ts {
3468
3496
  private getLinkedEditingRange;
3469
3497
  private getDocumentHighlights;
3470
3498
  private provideInlayHints;
3499
+ private mapCode;
3471
3500
  private setCompilerOptionsForInferredProjects;
3472
3501
  private getProjectInfo;
3473
3502
  private getProjectInfoWorker;