typescript 5.5.0-dev.20240508 → 5.5.0-dev.20240510
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.
- package/lib/tsc.js +338 -167
- package/lib/typescript.d.ts +53 -0
- package/lib/typescript.js +636 -338
- package/package.json +2 -2
package/lib/typescript.d.ts
CHANGED
|
@@ -20,10 +20,18 @@ declare namespace ts {
|
|
|
20
20
|
export import ClassificationType = ts.ClassificationType;
|
|
21
21
|
export import CompletionsTriggerCharacter = ts.CompletionsTriggerCharacter;
|
|
22
22
|
export import CompletionTriggerKind = ts.CompletionTriggerKind;
|
|
23
|
+
export import InlayHintKind = ts.InlayHintKind;
|
|
23
24
|
export import OrganizeImportsMode = ts.OrganizeImportsMode;
|
|
25
|
+
export import RefactorActionInfo = ts.RefactorActionInfo;
|
|
24
26
|
export import RefactorTriggerReason = ts.RefactorTriggerReason;
|
|
25
27
|
export import RenameInfoFailure = ts.RenameInfoFailure;
|
|
26
28
|
export import SemicolonPreference = ts.SemicolonPreference;
|
|
29
|
+
export import SignatureHelpCharacterTypedReason = ts.SignatureHelpCharacterTypedReason;
|
|
30
|
+
export import SignatureHelpInvokedReason = ts.SignatureHelpInvokedReason;
|
|
31
|
+
export import SignatureHelpParameter = ts.SignatureHelpParameter;
|
|
32
|
+
export import SignatureHelpRetriggerCharacter = ts.SignatureHelpRetriggerCharacter;
|
|
33
|
+
export import SignatureHelpRetriggeredReason = ts.SignatureHelpRetriggeredReason;
|
|
34
|
+
export import SignatureHelpTriggerCharacter = ts.SignatureHelpTriggerCharacter;
|
|
27
35
|
export import SignatureHelpTriggerReason = ts.SignatureHelpTriggerReason;
|
|
28
36
|
export import SymbolDisplayPart = ts.SymbolDisplayPart;
|
|
29
37
|
export import UserPreferences = ts.UserPreferences;
|
|
@@ -99,6 +107,7 @@ declare namespace ts {
|
|
|
99
107
|
GetApplicableRefactors = "getApplicableRefactors",
|
|
100
108
|
GetEditsForRefactor = "getEditsForRefactor",
|
|
101
109
|
GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions",
|
|
110
|
+
GetPasteEdits = "getPasteEdits",
|
|
102
111
|
OrganizeImports = "organizeImports",
|
|
103
112
|
GetEditsForFileRename = "getEditsForFileRename",
|
|
104
113
|
ConfigurePlugin = "configurePlugin",
|
|
@@ -469,6 +478,33 @@ declare namespace ts {
|
|
|
469
478
|
files: string[];
|
|
470
479
|
};
|
|
471
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* Request refactorings at a given position post pasting text from some other location.
|
|
483
|
+
*/
|
|
484
|
+
export interface GetPasteEditsRequest extends Request {
|
|
485
|
+
command: CommandTypes.GetPasteEdits;
|
|
486
|
+
arguments: GetPasteEditsRequestArgs;
|
|
487
|
+
}
|
|
488
|
+
export interface GetPasteEditsRequestArgs extends FileRequestArgs {
|
|
489
|
+
/** The text that gets pasted in a file. */
|
|
490
|
+
pastedText: string[];
|
|
491
|
+
/** Locations of where the `pastedText` gets added in a file. If the length of the `pastedText` and `pastedLocations` are not the same,
|
|
492
|
+
* then the `pastedText` is combined into one and added at all the `pastedLocations`.
|
|
493
|
+
*/
|
|
494
|
+
pasteLocations: TextSpan[];
|
|
495
|
+
/** The source location of each `pastedText`. If present, the length of `spans` must be equal to the length of `pastedText`. */
|
|
496
|
+
copiedFrom?: {
|
|
497
|
+
file: string;
|
|
498
|
+
spans: TextSpan[];
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
export interface GetPasteEditsResponse extends Response {
|
|
502
|
+
body: PasteEditsAction;
|
|
503
|
+
}
|
|
504
|
+
export interface PasteEditsAction {
|
|
505
|
+
edits: FileCodeEdits[];
|
|
506
|
+
fixId?: {};
|
|
507
|
+
}
|
|
472
508
|
export interface GetEditsForRefactorRequest extends Request {
|
|
473
509
|
command: CommandTypes.GetEditsForRefactor;
|
|
474
510
|
arguments: GetEditsForRefactorRequestArgs;
|
|
@@ -3499,6 +3535,7 @@ declare namespace ts {
|
|
|
3499
3535
|
private getApplicableRefactors;
|
|
3500
3536
|
private getEditsForRefactor;
|
|
3501
3537
|
private getMoveToRefactoringFileSuggestions;
|
|
3538
|
+
private getPasteEdits;
|
|
3502
3539
|
private organizeImports;
|
|
3503
3540
|
private getEditsForFileRename;
|
|
3504
3541
|
private getCodeFixes;
|
|
@@ -3507,6 +3544,7 @@ declare namespace ts {
|
|
|
3507
3544
|
private getStartAndEndPosition;
|
|
3508
3545
|
private mapCodeAction;
|
|
3509
3546
|
private mapCodeFixAction;
|
|
3547
|
+
private mapPasteEditsAction;
|
|
3510
3548
|
private mapTextChangesToCodeEdits;
|
|
3511
3549
|
private mapTextChangeToCodeEdit;
|
|
3512
3550
|
private convertTextChangeToCodeEdit;
|
|
@@ -10103,6 +10141,7 @@ declare namespace ts {
|
|
|
10103
10141
|
uncommentSelection(fileName: string, textRange: TextRange): TextChange[];
|
|
10104
10142
|
getSupportedCodeFixes(fileName?: string): readonly string[];
|
|
10105
10143
|
dispose(): void;
|
|
10144
|
+
getPasteEdits(args: PasteEditsArgs, formatOptions: FormatCodeSettings): PasteEdits;
|
|
10106
10145
|
}
|
|
10107
10146
|
interface JsxClosingTagInfo {
|
|
10108
10147
|
readonly newText: string;
|
|
@@ -10120,6 +10159,20 @@ declare namespace ts {
|
|
|
10120
10159
|
SortAndCombine = "SortAndCombine",
|
|
10121
10160
|
RemoveUnused = "RemoveUnused",
|
|
10122
10161
|
}
|
|
10162
|
+
interface PasteEdits {
|
|
10163
|
+
edits: readonly FileTextChanges[];
|
|
10164
|
+
fixId?: {};
|
|
10165
|
+
}
|
|
10166
|
+
interface PasteEditsArgs {
|
|
10167
|
+
targetFile: string;
|
|
10168
|
+
pastedText: string[];
|
|
10169
|
+
pasteLocations: TextRange[];
|
|
10170
|
+
copiedFrom: {
|
|
10171
|
+
file: string;
|
|
10172
|
+
range: TextRange[];
|
|
10173
|
+
} | undefined;
|
|
10174
|
+
preferences: UserPreferences;
|
|
10175
|
+
}
|
|
10123
10176
|
interface OrganizeImportsArgs extends CombinedCodeFixScope {
|
|
10124
10177
|
/** @deprecated Use `mode` instead */
|
|
10125
10178
|
skipDestructiveCodeActions?: boolean;
|