typescript 5.5.0-dev.20240303 → 5.5.0-dev.20240305

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.
@@ -15,92 +15,30 @@ and limitations under the License.
15
15
 
16
16
  declare namespace ts {
17
17
  namespace server {
18
- type ActionSet = "action::set";
19
- type ActionInvalidate = "action::invalidate";
20
- type ActionPackageInstalled = "action::packageInstalled";
21
- type EventTypesRegistry = "event::typesRegistry";
22
- type EventBeginInstallTypes = "event::beginInstallTypes";
23
- type EventEndInstallTypes = "event::endInstallTypes";
24
- type EventInitializationFailed = "event::initializationFailed";
25
- type ActionWatchTypingLocations = "action::watchTypingLocations";
26
- interface TypingInstallerResponse {
27
- readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations;
28
- }
29
- interface TypingInstallerRequestWithProjectName {
30
- readonly projectName: string;
31
- }
32
- interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
33
- readonly fileNames: string[];
34
- readonly projectRootPath: Path;
35
- readonly compilerOptions: CompilerOptions;
36
- readonly typeAcquisition: TypeAcquisition;
37
- readonly unresolvedImports: SortedReadonlyArray<string>;
38
- readonly cachePath?: string;
39
- readonly kind: "discover";
40
- }
41
- interface CloseProject extends TypingInstallerRequestWithProjectName {
42
- readonly kind: "closeProject";
43
- }
44
- interface TypesRegistryRequest {
45
- readonly kind: "typesRegistry";
46
- }
47
- interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
48
- readonly kind: "installPackage";
49
- readonly fileName: Path;
50
- readonly packageName: string;
51
- readonly projectRootPath: Path;
52
- readonly id: number;
53
- }
54
- interface PackageInstalledResponse extends ProjectResponse {
55
- readonly kind: ActionPackageInstalled;
56
- readonly id: number;
57
- readonly success: boolean;
58
- readonly message: string;
59
- }
60
- interface InitializationFailedResponse extends TypingInstallerResponse {
61
- readonly kind: EventInitializationFailed;
62
- readonly message: string;
63
- readonly stack?: string;
64
- }
65
- interface ProjectResponse extends TypingInstallerResponse {
66
- readonly projectName: string;
67
- }
68
- interface InvalidateCachedTypings extends ProjectResponse {
69
- readonly kind: ActionInvalidate;
70
- }
71
- interface InstallTypes extends ProjectResponse {
72
- readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
73
- readonly eventId: number;
74
- readonly typingsInstallerVersion: string;
75
- readonly packagesToInstall: readonly string[];
76
- }
77
- interface BeginInstallTypes extends InstallTypes {
78
- readonly kind: EventBeginInstallTypes;
79
- }
80
- interface EndInstallTypes extends InstallTypes {
81
- readonly kind: EventEndInstallTypes;
82
- readonly installSuccess: boolean;
83
- }
84
- interface InstallTypingHost extends JsTyping.TypingResolutionHost {
85
- useCaseSensitiveFileNames: boolean;
86
- writeFile(path: string, content: string): void;
87
- createDirectory(path: string): void;
88
- getCurrentDirectory?(): string;
89
- }
90
- interface SetTypings extends ProjectResponse {
91
- readonly typeAcquisition: TypeAcquisition;
92
- readonly compilerOptions: CompilerOptions;
93
- readonly typings: string[];
94
- readonly unresolvedImports: SortedReadonlyArray<string>;
95
- readonly kind: ActionSet;
96
- }
97
- interface WatchTypingLocations extends ProjectResponse {
98
- /** if files is undefined, retain same set of watchers */
99
- readonly files: readonly string[] | undefined;
100
- readonly kind: ActionWatchTypingLocations;
101
- }
102
18
  namespace protocol {
103
- enum CommandTypes {
19
+ export import ApplicableRefactorInfo = ts.ApplicableRefactorInfo;
20
+ export import ClassificationType = ts.ClassificationType;
21
+ export import CompletionsTriggerCharacter = ts.CompletionsTriggerCharacter;
22
+ export import CompletionTriggerKind = ts.CompletionTriggerKind;
23
+ export import OrganizeImportsMode = ts.OrganizeImportsMode;
24
+ export import RefactorTriggerReason = ts.RefactorTriggerReason;
25
+ export import RenameInfoFailure = ts.RenameInfoFailure;
26
+ export import SemicolonPreference = ts.SemicolonPreference;
27
+ export import SignatureHelpTriggerReason = ts.SignatureHelpTriggerReason;
28
+ export import SymbolDisplayPart = ts.SymbolDisplayPart;
29
+ export import UserPreferences = ts.UserPreferences;
30
+ type ChangePropertyTypes<
31
+ T,
32
+ Substitutions extends {
33
+ [K in keyof T]?: any;
34
+ },
35
+ > = {
36
+ [K in keyof T]: K extends keyof Substitutions ? Substitutions[K] : T[K];
37
+ };
38
+ type ChangeStringIndexSignature<T, NewStringIndexSignatureType> = {
39
+ [K in keyof T]: string extends K ? NewStringIndexSignatureType : T[K];
40
+ };
41
+ export enum CommandTypes {
104
42
  JsxClosingTag = "jsxClosingTag",
105
43
  LinkedEditingRange = "linkedEditingRange",
106
44
  Brace = "brace",
@@ -178,7 +116,7 @@ declare namespace ts {
178
116
  /**
179
117
  * A TypeScript Server message
180
118
  */
181
- interface Message {
119
+ export interface Message {
182
120
  /**
183
121
  * Sequence number of the message
184
122
  */
@@ -191,7 +129,7 @@ declare namespace ts {
191
129
  /**
192
130
  * Client-initiated request message
193
131
  */
194
- interface Request extends Message {
132
+ export interface Request extends Message {
195
133
  type: "request";
196
134
  /**
197
135
  * The command to execute
@@ -205,13 +143,13 @@ declare namespace ts {
205
143
  /**
206
144
  * Request to reload the project structure for all the opened files
207
145
  */
208
- interface ReloadProjectsRequest extends Request {
146
+ export interface ReloadProjectsRequest extends Request {
209
147
  command: CommandTypes.ReloadProjects;
210
148
  }
211
149
  /**
212
150
  * Server-initiated event message
213
151
  */
214
- interface Event extends Message {
152
+ export interface Event extends Message {
215
153
  type: "event";
216
154
  /**
217
155
  * Name of event
@@ -225,7 +163,7 @@ declare namespace ts {
225
163
  /**
226
164
  * Response by server to client request message.
227
165
  */
228
- interface Response extends Message {
166
+ export interface Response extends Message {
229
167
  type: "response";
230
168
  /**
231
169
  * Sequence number of the request message.
@@ -257,7 +195,7 @@ declare namespace ts {
257
195
  */
258
196
  performanceData?: PerformanceData;
259
197
  }
260
- interface PerformanceData {
198
+ export interface PerformanceData {
261
199
  /**
262
200
  * Time spent updating the program graph, in milliseconds.
263
201
  */
@@ -270,17 +208,17 @@ declare namespace ts {
270
208
  /**
271
209
  * Arguments for FileRequest messages.
272
210
  */
273
- interface FileRequestArgs {
211
+ export interface FileRequestArgs {
274
212
  /**
275
213
  * The file for the request (absolute pathname required).
276
214
  */
277
215
  file: string;
278
216
  projectFileName?: string;
279
217
  }
280
- interface StatusRequest extends Request {
218
+ export interface StatusRequest extends Request {
281
219
  command: CommandTypes.Status;
282
220
  }
283
- interface StatusResponseBody {
221
+ export interface StatusResponseBody {
284
222
  /**
285
223
  * The TypeScript version (`ts.version`).
286
224
  */
@@ -289,32 +227,32 @@ declare namespace ts {
289
227
  /**
290
228
  * Response to StatusRequest
291
229
  */
292
- interface StatusResponse extends Response {
230
+ export interface StatusResponse extends Response {
293
231
  body: StatusResponseBody;
294
232
  }
295
233
  /**
296
234
  * Requests a JS Doc comment template for a given position
297
235
  */
298
- interface DocCommentTemplateRequest extends FileLocationRequest {
236
+ export interface DocCommentTemplateRequest extends FileLocationRequest {
299
237
  command: CommandTypes.DocCommentTemplate;
300
238
  }
301
239
  /**
302
240
  * Response to DocCommentTemplateRequest
303
241
  */
304
- interface DocCommandTemplateResponse extends Response {
242
+ export interface DocCommandTemplateResponse extends Response {
305
243
  body?: TextInsertion;
306
244
  }
307
245
  /**
308
246
  * A request to get TODO comments from the file
309
247
  */
310
- interface TodoCommentRequest extends FileRequest {
248
+ export interface TodoCommentRequest extends FileRequest {
311
249
  command: CommandTypes.TodoComments;
312
250
  arguments: TodoCommentRequestArgs;
313
251
  }
314
252
  /**
315
253
  * Arguments for TodoCommentRequest request.
316
254
  */
317
- interface TodoCommentRequestArgs extends FileRequestArgs {
255
+ export interface TodoCommentRequestArgs extends FileRequestArgs {
318
256
  /**
319
257
  * Array of target TodoCommentDescriptors that describes TODO comments to be found
320
258
  */
@@ -323,17 +261,17 @@ declare namespace ts {
323
261
  /**
324
262
  * Response for TodoCommentRequest request.
325
263
  */
326
- interface TodoCommentsResponse extends Response {
264
+ export interface TodoCommentsResponse extends Response {
327
265
  body?: TodoComment[];
328
266
  }
329
267
  /**
330
268
  * A request to determine if the caret is inside a comment.
331
269
  */
332
- interface SpanOfEnclosingCommentRequest extends FileLocationRequest {
270
+ export interface SpanOfEnclosingCommentRequest extends FileLocationRequest {
333
271
  command: CommandTypes.GetSpanOfEnclosingComment;
334
272
  arguments: SpanOfEnclosingCommentRequestArgs;
335
273
  }
336
- interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs {
274
+ export interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs {
337
275
  /**
338
276
  * Requires that the enclosing span be a multi-line comment, or else the request returns undefined.
339
277
  */
@@ -342,49 +280,36 @@ declare namespace ts {
342
280
  /**
343
281
  * Request to obtain outlining spans in file.
344
282
  */
345
- interface OutliningSpansRequest extends FileRequest {
283
+ export interface OutliningSpansRequest extends FileRequest {
346
284
  command: CommandTypes.GetOutliningSpans;
347
285
  }
348
- interface OutliningSpan {
349
- /** The span of the document to actually collapse. */
286
+ export type OutliningSpan = ChangePropertyTypes<ts.OutliningSpan, {
350
287
  textSpan: TextSpan;
351
- /** The span of the document to display when the user hovers over the collapsed span. */
352
288
  hintSpan: TextSpan;
353
- /** The text to display in the editor for the collapsed region. */
354
- bannerText: string;
355
- /**
356
- * Whether or not this region should be automatically collapsed when
357
- * the 'Collapse to Definitions' command is invoked.
358
- */
359
- autoCollapse: boolean;
360
- /**
361
- * Classification of the contents of the span
362
- */
363
- kind: OutliningSpanKind;
364
- }
289
+ }>;
365
290
  /**
366
291
  * Response to OutliningSpansRequest request.
367
292
  */
368
- interface OutliningSpansResponse extends Response {
293
+ export interface OutliningSpansResponse extends Response {
369
294
  body?: OutliningSpan[];
370
295
  }
371
296
  /**
372
297
  * A request to get indentation for a location in file
373
298
  */
374
- interface IndentationRequest extends FileLocationRequest {
299
+ export interface IndentationRequest extends FileLocationRequest {
375
300
  command: CommandTypes.Indentation;
376
301
  arguments: IndentationRequestArgs;
377
302
  }
378
303
  /**
379
304
  * Response for IndentationRequest request.
380
305
  */
381
- interface IndentationResponse extends Response {
306
+ export interface IndentationResponse extends Response {
382
307
  body?: IndentationResult;
383
308
  }
384
309
  /**
385
310
  * Indentation result representing where indentation should be placed
386
311
  */
387
- interface IndentationResult {
312
+ export interface IndentationResult {
388
313
  /**
389
314
  * The base position in the document that the indent should be relative to
390
315
  */
@@ -397,7 +322,7 @@ declare namespace ts {
397
322
  /**
398
323
  * Arguments for IndentationRequest request.
399
324
  */
400
- interface IndentationRequestArgs extends FileLocationRequestArgs {
325
+ export interface IndentationRequestArgs extends FileLocationRequestArgs {
401
326
  /**
402
327
  * An optional set of settings to be used when computing indentation.
403
328
  * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings.
@@ -407,7 +332,7 @@ declare namespace ts {
407
332
  /**
408
333
  * Arguments for ProjectInfoRequest request.
409
334
  */
410
- interface ProjectInfoRequestArgs extends FileRequestArgs {
335
+ export interface ProjectInfoRequestArgs extends FileRequestArgs {
411
336
  /**
412
337
  * Indicate if the file name list of the project is needed
413
338
  */
@@ -416,20 +341,20 @@ declare namespace ts {
416
341
  /**
417
342
  * A request to get the project information of the current file.
418
343
  */
419
- interface ProjectInfoRequest extends Request {
344
+ export interface ProjectInfoRequest extends Request {
420
345
  command: CommandTypes.ProjectInfo;
421
346
  arguments: ProjectInfoRequestArgs;
422
347
  }
423
348
  /**
424
349
  * A request to retrieve compiler options diagnostics for a project
425
350
  */
426
- interface CompilerOptionsDiagnosticsRequest extends Request {
351
+ export interface CompilerOptionsDiagnosticsRequest extends Request {
427
352
  arguments: CompilerOptionsDiagnosticsRequestArgs;
428
353
  }
429
354
  /**
430
355
  * Arguments for CompilerOptionsDiagnosticsRequest request.
431
356
  */
432
- interface CompilerOptionsDiagnosticsRequestArgs {
357
+ export interface CompilerOptionsDiagnosticsRequestArgs {
433
358
  /**
434
359
  * Name of the project to retrieve compiler options diagnostics.
435
360
  */
@@ -438,7 +363,7 @@ declare namespace ts {
438
363
  /**
439
364
  * Response message body for "projectInfo" request
440
365
  */
441
- interface ProjectInfo {
366
+ export interface ProjectInfo {
442
367
  /**
443
368
  * For configured project, this is the normalized path of the 'tsconfig.json' file
444
369
  * For inferred project, this is undefined
@@ -458,7 +383,7 @@ declare namespace ts {
458
383
  * - start position and length of the error span
459
384
  * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span.
460
385
  */
461
- interface DiagnosticWithLinePosition {
386
+ export interface DiagnosticWithLinePosition {
462
387
  message: string;
463
388
  start: number;
464
389
  length: number;
@@ -474,20 +399,20 @@ declare namespace ts {
474
399
  /**
475
400
  * Response message for "projectInfo" request
476
401
  */
477
- interface ProjectInfoResponse extends Response {
402
+ export interface ProjectInfoResponse extends Response {
478
403
  body?: ProjectInfo;
479
404
  }
480
405
  /**
481
406
  * Request whose sole parameter is a file name.
482
407
  */
483
- interface FileRequest extends Request {
408
+ export interface FileRequest extends Request {
484
409
  arguments: FileRequestArgs;
485
410
  }
486
411
  /**
487
412
  * Instances of this interface specify a location in a source file:
488
413
  * (file, line, character offset), where line and character offset are 1-based.
489
414
  */
490
- interface FileLocationRequestArgs extends FileRequestArgs {
415
+ export interface FileLocationRequestArgs extends FileRequestArgs {
491
416
  /**
492
417
  * The line number for the request (1-based).
493
418
  */
@@ -497,15 +422,15 @@ declare namespace ts {
497
422
  */
498
423
  offset: number;
499
424
  }
500
- type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
425
+ export type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
501
426
  /**
502
427
  * Request refactorings at a given position or selection area.
503
428
  */
504
- interface GetApplicableRefactorsRequest extends Request {
429
+ export interface GetApplicableRefactorsRequest extends Request {
505
430
  command: CommandTypes.GetApplicableRefactors;
506
431
  arguments: GetApplicableRefactorsRequestArgs;
507
432
  }
508
- type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
433
+ export type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
509
434
  triggerReason?: RefactorTriggerReason;
510
435
  kind?: string;
511
436
  /**
@@ -517,88 +442,34 @@ declare namespace ts {
517
442
  */
518
443
  includeInteractiveActions?: boolean;
519
444
  };
520
- type RefactorTriggerReason = "implicit" | "invoked";
521
445
  /**
522
446
  * Response is a list of available refactorings.
523
447
  * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring
524
448
  */
525
- interface GetApplicableRefactorsResponse extends Response {
449
+ export interface GetApplicableRefactorsResponse extends Response {
526
450
  body?: ApplicableRefactorInfo[];
527
451
  }
528
452
  /**
529
453
  * Request refactorings at a given position or selection area to move to an existing file.
530
454
  */
531
- interface GetMoveToRefactoringFileSuggestionsRequest extends Request {
455
+ export interface GetMoveToRefactoringFileSuggestionsRequest extends Request {
532
456
  command: CommandTypes.GetMoveToRefactoringFileSuggestions;
533
457
  arguments: GetMoveToRefactoringFileSuggestionsRequestArgs;
534
458
  }
535
- type GetMoveToRefactoringFileSuggestionsRequestArgs = FileLocationOrRangeRequestArgs & {
459
+ export type GetMoveToRefactoringFileSuggestionsRequestArgs = FileLocationOrRangeRequestArgs & {
536
460
  kind?: string;
537
461
  };
538
462
  /**
539
463
  * Response is a list of available files.
540
464
  * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring
541
465
  */
542
- interface GetMoveToRefactoringFileSuggestions extends Response {
466
+ export interface GetMoveToRefactoringFileSuggestions extends Response {
543
467
  body: {
544
468
  newFileName: string;
545
469
  files: string[];
546
470
  };
547
471
  }
548
- /**
549
- * A set of one or more available refactoring actions, grouped under a parent refactoring.
550
- */
551
- interface ApplicableRefactorInfo {
552
- /**
553
- * The programmatic name of the refactoring
554
- */
555
- name: string;
556
- /**
557
- * A description of this refactoring category to show to the user.
558
- * If the refactoring gets inlined (see below), this text will not be visible.
559
- */
560
- description: string;
561
- /**
562
- * Inlineable refactorings can have their actions hoisted out to the top level
563
- * of a context menu. Non-inlineanable refactorings should always be shown inside
564
- * their parent grouping.
565
- *
566
- * If not specified, this value is assumed to be 'true'
567
- */
568
- inlineable?: boolean;
569
- actions: RefactorActionInfo[];
570
- }
571
- /**
572
- * Represents a single refactoring action - for example, the "Extract Method..." refactor might
573
- * offer several actions, each corresponding to a surround class or closure to extract into.
574
- */
575
- interface RefactorActionInfo {
576
- /**
577
- * The programmatic name of the refactoring action
578
- */
579
- name: string;
580
- /**
581
- * A description of this refactoring action to show to the user.
582
- * If the parent refactoring is inlined away, this will be the only text shown,
583
- * so this description should make sense by itself if the parent is inlineable=true
584
- */
585
- description: string;
586
- /**
587
- * A message to show to the user if the refactoring cannot be applied in
588
- * the current context.
589
- */
590
- notApplicableReason?: string;
591
- /**
592
- * The hierarchical dotted name of the refactor action.
593
- */
594
- kind?: string;
595
- /**
596
- * Indicates that the action requires additional arguments to be passed
597
- * when calling 'GetEditsForRefactor'.
598
- */
599
- isInteractive?: boolean;
600
- }
601
- interface GetEditsForRefactorRequest extends Request {
472
+ export interface GetEditsForRefactorRequest extends Request {
602
473
  command: CommandTypes.GetEditsForRefactor;
603
474
  arguments: GetEditsForRefactorRequestArgs;
604
475
  }
@@ -606,15 +477,15 @@ declare namespace ts {
606
477
  * Request the edits that a particular refactoring action produces.
607
478
  * Callers must specify the name of the refactor and the name of the action.
608
479
  */
609
- type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & {
480
+ export type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & {
610
481
  refactor: string;
611
482
  action: string;
612
483
  interactiveRefactorArguments?: InteractiveRefactorArguments;
613
484
  };
614
- interface GetEditsForRefactorResponse extends Response {
485
+ export interface GetEditsForRefactorResponse extends Response {
615
486
  body?: RefactorEditInfo;
616
487
  }
617
- interface RefactorEditInfo {
488
+ export interface RefactorEditInfo {
618
489
  edits: FileCodeEdits[];
619
490
  /**
620
491
  * An optional location where the editor should start a rename operation once
@@ -630,58 +501,53 @@ declare namespace ts {
630
501
  * 2) Coalescing imports from the same module
631
502
  * 3) Sorting imports
632
503
  */
633
- interface OrganizeImportsRequest extends Request {
504
+ export interface OrganizeImportsRequest extends Request {
634
505
  command: CommandTypes.OrganizeImports;
635
506
  arguments: OrganizeImportsRequestArgs;
636
507
  }
637
- type OrganizeImportsScope = GetCombinedCodeFixScope;
638
- enum OrganizeImportsMode {
639
- All = "All",
640
- SortAndCombine = "SortAndCombine",
641
- RemoveUnused = "RemoveUnused",
642
- }
643
- interface OrganizeImportsRequestArgs {
508
+ export type OrganizeImportsScope = GetCombinedCodeFixScope;
509
+ export interface OrganizeImportsRequestArgs {
644
510
  scope: OrganizeImportsScope;
645
511
  /** @deprecated Use `mode` instead */
646
512
  skipDestructiveCodeActions?: boolean;
647
513
  mode?: OrganizeImportsMode;
648
514
  }
649
- interface OrganizeImportsResponse extends Response {
515
+ export interface OrganizeImportsResponse extends Response {
650
516
  body: readonly FileCodeEdits[];
651
517
  }
652
- interface GetEditsForFileRenameRequest extends Request {
518
+ export interface GetEditsForFileRenameRequest extends Request {
653
519
  command: CommandTypes.GetEditsForFileRename;
654
520
  arguments: GetEditsForFileRenameRequestArgs;
655
521
  }
656
522
  /** Note: Paths may also be directories. */
657
- interface GetEditsForFileRenameRequestArgs {
523
+ export interface GetEditsForFileRenameRequestArgs {
658
524
  readonly oldFilePath: string;
659
525
  readonly newFilePath: string;
660
526
  }
661
- interface GetEditsForFileRenameResponse extends Response {
527
+ export interface GetEditsForFileRenameResponse extends Response {
662
528
  body: readonly FileCodeEdits[];
663
529
  }
664
530
  /**
665
531
  * Request for the available codefixes at a specific position.
666
532
  */
667
- interface CodeFixRequest extends Request {
533
+ export interface CodeFixRequest extends Request {
668
534
  command: CommandTypes.GetCodeFixes;
669
535
  arguments: CodeFixRequestArgs;
670
536
  }
671
- interface GetCombinedCodeFixRequest extends Request {
537
+ export interface GetCombinedCodeFixRequest extends Request {
672
538
  command: CommandTypes.GetCombinedCodeFix;
673
539
  arguments: GetCombinedCodeFixRequestArgs;
674
540
  }
675
- interface GetCombinedCodeFixResponse extends Response {
541
+ export interface GetCombinedCodeFixResponse extends Response {
676
542
  body: CombinedCodeActions;
677
543
  }
678
- interface ApplyCodeActionCommandRequest extends Request {
544
+ export interface ApplyCodeActionCommandRequest extends Request {
679
545
  command: CommandTypes.ApplyCodeActionCommand;
680
546
  arguments: ApplyCodeActionCommandRequestArgs;
681
547
  }
682
- interface ApplyCodeActionCommandResponse extends Response {
548
+ export interface ApplyCodeActionCommandResponse extends Response {
683
549
  }
684
- interface FileRangeRequestArgs extends FileRequestArgs {
550
+ export interface FileRangeRequestArgs extends FileRequestArgs {
685
551
  /**
686
552
  * The line number for the request (1-based).
687
553
  */
@@ -702,47 +568,47 @@ declare namespace ts {
702
568
  /**
703
569
  * Instances of this interface specify errorcodes on a specific location in a sourcefile.
704
570
  */
705
- interface CodeFixRequestArgs extends FileRangeRequestArgs {
571
+ export interface CodeFixRequestArgs extends FileRangeRequestArgs {
706
572
  /**
707
573
  * Errorcodes we want to get the fixes for.
708
574
  */
709
575
  errorCodes: readonly number[];
710
576
  }
711
- interface GetCombinedCodeFixRequestArgs {
577
+ export interface GetCombinedCodeFixRequestArgs {
712
578
  scope: GetCombinedCodeFixScope;
713
579
  fixId: {};
714
580
  }
715
- interface GetCombinedCodeFixScope {
581
+ export interface GetCombinedCodeFixScope {
716
582
  type: "file";
717
583
  args: FileRequestArgs;
718
584
  }
719
- interface ApplyCodeActionCommandRequestArgs {
585
+ export interface ApplyCodeActionCommandRequestArgs {
720
586
  /** May also be an array of commands. */
721
587
  command: {};
722
588
  }
723
589
  /**
724
590
  * Response for GetCodeFixes request.
725
591
  */
726
- interface GetCodeFixesResponse extends Response {
592
+ export interface GetCodeFixesResponse extends Response {
727
593
  body?: CodeAction[];
728
594
  }
729
595
  /**
730
596
  * A request whose arguments specify a file location (file, line, col).
731
597
  */
732
- interface FileLocationRequest extends FileRequest {
598
+ export interface FileLocationRequest extends FileRequest {
733
599
  arguments: FileLocationRequestArgs;
734
600
  }
735
601
  /**
736
602
  * A request to get codes of supported code fixes.
737
603
  */
738
- interface GetSupportedCodeFixesRequest extends Request {
604
+ export interface GetSupportedCodeFixesRequest extends Request {
739
605
  command: CommandTypes.GetSupportedCodeFixes;
740
606
  arguments?: Partial<FileRequestArgs>;
741
607
  }
742
608
  /**
743
609
  * A response for GetSupportedCodeFixesRequest request.
744
610
  */
745
- interface GetSupportedCodeFixesResponse extends Response {
611
+ export interface GetSupportedCodeFixesResponse extends Response {
746
612
  /**
747
613
  * List of error codes supported by the server.
748
614
  */
@@ -751,13 +617,13 @@ declare namespace ts {
751
617
  /**
752
618
  * A request to get encoded semantic classifications for a span in the file
753
619
  */
754
- interface EncodedSemanticClassificationsRequest extends FileRequest {
620
+ export interface EncodedSemanticClassificationsRequest extends FileRequest {
755
621
  arguments: EncodedSemanticClassificationsRequestArgs;
756
622
  }
757
623
  /**
758
624
  * Arguments for EncodedSemanticClassificationsRequest request.
759
625
  */
760
- interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
626
+ export interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
761
627
  /**
762
628
  * Start position of the span.
763
629
  */
@@ -773,13 +639,13 @@ declare namespace ts {
773
639
  format?: "original" | "2020";
774
640
  }
775
641
  /** The response for a EncodedSemanticClassificationsRequest */
776
- interface EncodedSemanticClassificationsResponse extends Response {
642
+ export interface EncodedSemanticClassificationsResponse extends Response {
777
643
  body?: EncodedSemanticClassificationsResponseBody;
778
644
  }
779
645
  /**
780
646
  * Implementation response message. Gives series of text spans depending on the format ar.
781
647
  */
782
- interface EncodedSemanticClassificationsResponseBody {
648
+ export interface EncodedSemanticClassificationsResponseBody {
783
649
  endOfLineState: EndOfLineState;
784
650
  spans: number[];
785
651
  }
@@ -787,7 +653,7 @@ declare namespace ts {
787
653
  * Arguments in document highlight request; include: filesToSearch, file,
788
654
  * line, offset.
789
655
  */
790
- interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
656
+ export interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
791
657
  /**
792
658
  * List of files to search for document highlights.
793
659
  */
@@ -798,16 +664,16 @@ declare namespace ts {
798
664
  * "definition". Return response giving the file locations that
799
665
  * define the symbol found in file at location line, col.
800
666
  */
801
- interface DefinitionRequest extends FileLocationRequest {
667
+ export interface DefinitionRequest extends FileLocationRequest {
802
668
  command: CommandTypes.Definition;
803
669
  }
804
- interface DefinitionAndBoundSpanRequest extends FileLocationRequest {
670
+ export interface DefinitionAndBoundSpanRequest extends FileLocationRequest {
805
671
  readonly command: CommandTypes.DefinitionAndBoundSpan;
806
672
  }
807
- interface FindSourceDefinitionRequest extends FileLocationRequest {
673
+ export interface FindSourceDefinitionRequest extends FileLocationRequest {
808
674
  readonly command: CommandTypes.FindSourceDefinition;
809
675
  }
810
- interface DefinitionAndBoundSpanResponse extends Response {
676
+ export interface DefinitionAndBoundSpanResponse extends Response {
811
677
  readonly body: DefinitionInfoAndBoundSpan;
812
678
  }
813
679
  /**
@@ -815,7 +681,7 @@ declare namespace ts {
815
681
  * "typeDefinition". Return response giving the file locations that
816
682
  * define the type for the symbol found in file at location line, col.
817
683
  */
818
- interface TypeDefinitionRequest extends FileLocationRequest {
684
+ export interface TypeDefinitionRequest extends FileLocationRequest {
819
685
  command: CommandTypes.TypeDefinition;
820
686
  }
821
687
  /**
@@ -823,20 +689,20 @@ declare namespace ts {
823
689
  * "implementation". Return response giving the file locations that
824
690
  * implement the symbol found in file at location line, col.
825
691
  */
826
- interface ImplementationRequest extends FileLocationRequest {
692
+ export interface ImplementationRequest extends FileLocationRequest {
827
693
  command: CommandTypes.Implementation;
828
694
  }
829
695
  /**
830
696
  * Location in source code expressed as (one-based) line and (one-based) column offset.
831
697
  */
832
- interface Location {
698
+ export interface Location {
833
699
  line: number;
834
700
  offset: number;
835
701
  }
836
702
  /**
837
703
  * Object found in response messages defining a span of text in source code.
838
704
  */
839
- interface TextSpan {
705
+ export interface TextSpan {
840
706
  /**
841
707
  * First character of the definition.
842
708
  */
@@ -849,13 +715,13 @@ declare namespace ts {
849
715
  /**
850
716
  * Object found in response messages defining a span of text in a specific source file.
851
717
  */
852
- interface FileSpan extends TextSpan {
718
+ export interface FileSpan extends TextSpan {
853
719
  /**
854
720
  * File containing text span.
855
721
  */
856
722
  file: string;
857
723
  }
858
- interface JSDocTagInfo {
724
+ export interface JSDocTagInfo {
859
725
  /** Name of the JSDoc tag */
860
726
  name: string;
861
727
  /**
@@ -864,78 +730,78 @@ declare namespace ts {
864
730
  */
865
731
  text?: string | SymbolDisplayPart[];
866
732
  }
867
- interface TextSpanWithContext extends TextSpan {
733
+ export interface TextSpanWithContext extends TextSpan {
868
734
  contextStart?: Location;
869
735
  contextEnd?: Location;
870
736
  }
871
- interface FileSpanWithContext extends FileSpan, TextSpanWithContext {
737
+ export interface FileSpanWithContext extends FileSpan, TextSpanWithContext {
872
738
  }
873
- interface DefinitionInfo extends FileSpanWithContext {
739
+ export interface DefinitionInfo extends FileSpanWithContext {
874
740
  /**
875
741
  * When true, the file may or may not exist.
876
742
  */
877
743
  unverified?: boolean;
878
744
  }
879
- interface DefinitionInfoAndBoundSpan {
745
+ export interface DefinitionInfoAndBoundSpan {
880
746
  definitions: readonly DefinitionInfo[];
881
747
  textSpan: TextSpan;
882
748
  }
883
749
  /**
884
750
  * Definition response message. Gives text range for definition.
885
751
  */
886
- interface DefinitionResponse extends Response {
752
+ export interface DefinitionResponse extends Response {
887
753
  body?: DefinitionInfo[];
888
754
  }
889
- interface DefinitionInfoAndBoundSpanResponse extends Response {
755
+ export interface DefinitionInfoAndBoundSpanResponse extends Response {
890
756
  body?: DefinitionInfoAndBoundSpan;
891
757
  }
892
758
  /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */
893
- type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse;
759
+ export type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse;
894
760
  /**
895
761
  * Definition response message. Gives text range for definition.
896
762
  */
897
- interface TypeDefinitionResponse extends Response {
763
+ export interface TypeDefinitionResponse extends Response {
898
764
  body?: FileSpanWithContext[];
899
765
  }
900
766
  /**
901
767
  * Implementation response message. Gives text range for implementations.
902
768
  */
903
- interface ImplementationResponse extends Response {
769
+ export interface ImplementationResponse extends Response {
904
770
  body?: FileSpanWithContext[];
905
771
  }
906
772
  /**
907
773
  * Request to get brace completion for a location in the file.
908
774
  */
909
- interface BraceCompletionRequest extends FileLocationRequest {
775
+ export interface BraceCompletionRequest extends FileLocationRequest {
910
776
  command: CommandTypes.BraceCompletion;
911
777
  arguments: BraceCompletionRequestArgs;
912
778
  }
913
779
  /**
914
780
  * Argument for BraceCompletionRequest request.
915
781
  */
916
- interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
782
+ export interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
917
783
  /**
918
784
  * Kind of opening brace
919
785
  */
920
786
  openingBrace: string;
921
787
  }
922
- interface JsxClosingTagRequest extends FileLocationRequest {
788
+ export interface JsxClosingTagRequest extends FileLocationRequest {
923
789
  readonly command: CommandTypes.JsxClosingTag;
924
790
  readonly arguments: JsxClosingTagRequestArgs;
925
791
  }
926
- interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
792
+ export interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
927
793
  }
928
- interface JsxClosingTagResponse extends Response {
794
+ export interface JsxClosingTagResponse extends Response {
929
795
  readonly body: TextInsertion;
930
796
  }
931
- interface LinkedEditingRangeRequest extends FileLocationRequest {
797
+ export interface LinkedEditingRangeRequest extends FileLocationRequest {
932
798
  readonly command: CommandTypes.LinkedEditingRange;
933
799
  }
934
- interface LinkedEditingRangesBody {
800
+ export interface LinkedEditingRangesBody {
935
801
  ranges: TextSpan[];
936
802
  wordPattern?: string;
937
803
  }
938
- interface LinkedEditingRangeResponse extends Response {
804
+ export interface LinkedEditingRangeResponse extends Response {
939
805
  readonly body: LinkedEditingRangesBody;
940
806
  }
941
807
  /**
@@ -943,20 +809,20 @@ declare namespace ts {
943
809
  * "documentHighlights". Return response giving spans that are relevant
944
810
  * in the file at a given line and column.
945
811
  */
946
- interface DocumentHighlightsRequest extends FileLocationRequest {
812
+ export interface DocumentHighlightsRequest extends FileLocationRequest {
947
813
  command: CommandTypes.DocumentHighlights;
948
814
  arguments: DocumentHighlightsRequestArgs;
949
815
  }
950
816
  /**
951
817
  * Span augmented with extra information that denotes the kind of the highlighting to be used for span.
952
818
  */
953
- interface HighlightSpan extends TextSpanWithContext {
819
+ export interface HighlightSpan extends TextSpanWithContext {
954
820
  kind: HighlightSpanKind;
955
821
  }
956
822
  /**
957
823
  * Represents a set of highligh spans for a give name
958
824
  */
959
- interface DocumentHighlightsItem {
825
+ export interface DocumentHighlightsItem {
960
826
  /**
961
827
  * File containing highlight spans.
962
828
  */
@@ -969,7 +835,7 @@ declare namespace ts {
969
835
  /**
970
836
  * Response for a DocumentHighlightsRequest request.
971
837
  */
972
- interface DocumentHighlightsResponse extends Response {
838
+ export interface DocumentHighlightsResponse extends Response {
973
839
  body?: DocumentHighlightsItem[];
974
840
  }
975
841
  /**
@@ -977,10 +843,10 @@ declare namespace ts {
977
843
  * "references". Return response giving the file locations that
978
844
  * reference the symbol found in file at location line, col.
979
845
  */
980
- interface ReferencesRequest extends FileLocationRequest {
846
+ export interface ReferencesRequest extends FileLocationRequest {
981
847
  command: CommandTypes.References;
982
848
  }
983
- interface ReferencesResponseItem extends FileSpanWithContext {
849
+ export interface ReferencesResponseItem extends FileSpanWithContext {
984
850
  /**
985
851
  * Text of line containing the reference. Including this
986
852
  * with the response avoids latency of editor loading files
@@ -1004,7 +870,7 @@ declare namespace ts {
1004
870
  /**
1005
871
  * The body of a "references" response message.
1006
872
  */
1007
- interface ReferencesResponseBody {
873
+ export interface ReferencesResponseBody {
1008
874
  /**
1009
875
  * The file locations referencing the symbol.
1010
876
  */
@@ -1025,13 +891,13 @@ declare namespace ts {
1025
891
  /**
1026
892
  * Response to "references" request.
1027
893
  */
1028
- interface ReferencesResponse extends Response {
894
+ export interface ReferencesResponse extends Response {
1029
895
  body?: ReferencesResponseBody;
1030
896
  }
1031
- interface FileReferencesRequest extends FileRequest {
897
+ export interface FileReferencesRequest extends FileRequest {
1032
898
  command: CommandTypes.FileReferences;
1033
899
  }
1034
- interface FileReferencesResponseBody {
900
+ export interface FileReferencesResponseBody {
1035
901
  /**
1036
902
  * The file locations referencing the symbol.
1037
903
  */
@@ -1041,13 +907,13 @@ declare namespace ts {
1041
907
  */
1042
908
  symbolName: string;
1043
909
  }
1044
- interface FileReferencesResponse extends Response {
910
+ export interface FileReferencesResponse extends Response {
1045
911
  body?: FileReferencesResponseBody;
1046
912
  }
1047
913
  /**
1048
914
  * Argument for RenameRequest request.
1049
915
  */
1050
- interface RenameRequestArgs extends FileLocationRequestArgs {
916
+ export interface RenameRequestArgs extends FileLocationRequestArgs {
1051
917
  /**
1052
918
  * Should text at specified location be found/changed in comments?
1053
919
  */
@@ -1063,65 +929,31 @@ declare namespace ts {
1063
929
  * found in file at location line, col. Also return full display
1064
930
  * name of the symbol so that client can print it unambiguously.
1065
931
  */
1066
- interface RenameRequest extends FileLocationRequest {
932
+ export interface RenameRequest extends FileLocationRequest {
1067
933
  command: CommandTypes.Rename;
1068
934
  arguments: RenameRequestArgs;
1069
935
  }
1070
936
  /**
1071
937
  * Information about the item to be renamed.
1072
938
  */
1073
- type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
1074
- interface RenameInfoSuccess {
1075
- /**
1076
- * True if item can be renamed.
1077
- */
1078
- canRename: true;
1079
- /**
1080
- * File or directory to rename.
1081
- * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
1082
- */
1083
- fileToRename?: string;
1084
- /**
1085
- * Display name of the item to be renamed.
1086
- */
1087
- displayName: string;
1088
- /**
1089
- * Full display name of item to be renamed.
1090
- * If item to be renamed is a file, then this is the original text of the module specifer
1091
- */
1092
- fullDisplayName: string;
1093
- /**
1094
- * The items's kind (such as 'className' or 'parameterName' or plain 'text').
1095
- */
1096
- kind: ScriptElementKind;
1097
- /**
1098
- * Optional modifiers for the kind (such as 'public').
1099
- */
1100
- kindModifiers: string;
1101
- /** Span of text to rename. */
939
+ export type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
940
+ export type RenameInfoSuccess = ChangePropertyTypes<ts.RenameInfoSuccess, {
1102
941
  triggerSpan: TextSpan;
1103
- }
1104
- interface RenameInfoFailure {
1105
- canRename: false;
1106
- /**
1107
- * Error message if item can not be renamed.
1108
- */
1109
- localizedErrorMessage: string;
1110
- }
942
+ }>;
1111
943
  /**
1112
944
  * A group of text spans, all in 'file'.
1113
945
  */
1114
- interface SpanGroup {
946
+ export interface SpanGroup {
1115
947
  /** The file to which the spans apply */
1116
948
  file: string;
1117
949
  /** The text spans in this group */
1118
950
  locs: RenameTextSpan[];
1119
951
  }
1120
- interface RenameTextSpan extends TextSpanWithContext {
952
+ export interface RenameTextSpan extends TextSpanWithContext {
1121
953
  readonly prefixText?: string;
1122
954
  readonly suffixText?: string;
1123
955
  }
1124
- interface RenameResponseBody {
956
+ export interface RenameResponseBody {
1125
957
  /**
1126
958
  * Information about the item to be renamed.
1127
959
  */
@@ -1134,7 +966,7 @@ declare namespace ts {
1134
966
  /**
1135
967
  * Rename response message.
1136
968
  */
1137
- interface RenameResponse extends Response {
969
+ export interface RenameResponse extends Response {
1138
970
  body?: RenameResponseBody;
1139
971
  }
1140
972
  /**
@@ -1146,7 +978,7 @@ declare namespace ts {
1146
978
  * create configured project for every config file but will maintain a link that these projects were created
1147
979
  * as a result of opening external project so they should be removed once external project is closed.
1148
980
  */
1149
- interface ExternalFile {
981
+ export interface ExternalFile {
1150
982
  /**
1151
983
  * Name of file file
1152
984
  */
@@ -1167,7 +999,7 @@ declare namespace ts {
1167
999
  /**
1168
1000
  * Represent an external project
1169
1001
  */
1170
- interface ExternalProject {
1002
+ export interface ExternalProject {
1171
1003
  /**
1172
1004
  * Project name
1173
1005
  */
@@ -1185,7 +1017,7 @@ declare namespace ts {
1185
1017
  */
1186
1018
  typeAcquisition?: TypeAcquisition;
1187
1019
  }
1188
- interface CompileOnSaveMixin {
1020
+ export interface CompileOnSaveMixin {
1189
1021
  /**
1190
1022
  * If compile on save is enabled for the project
1191
1023
  */
@@ -1195,8 +1027,8 @@ declare namespace ts {
1195
1027
  * For external projects, some of the project settings are sent together with
1196
1028
  * compiler settings.
1197
1029
  */
1198
- type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
1199
- interface FileWithProjectReferenceRedirectInfo {
1030
+ export type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
1031
+ export interface FileWithProjectReferenceRedirectInfo {
1200
1032
  /**
1201
1033
  * Name of file
1202
1034
  */
@@ -1209,7 +1041,7 @@ declare namespace ts {
1209
1041
  /**
1210
1042
  * Represents a set of changes that happen in project
1211
1043
  */
1212
- interface ProjectChanges {
1044
+ export interface ProjectChanges {
1213
1045
  /**
1214
1046
  * List of added files
1215
1047
  */
@@ -1231,7 +1063,7 @@ declare namespace ts {
1231
1063
  /**
1232
1064
  * Information found in a configure request.
1233
1065
  */
1234
- interface ConfigureRequestArguments {
1066
+ export interface ConfigureRequestArguments {
1235
1067
  /**
1236
1068
  * Information about the host, for example 'Emacs 24.4' or
1237
1069
  * 'Sublime Text version 3075'
@@ -1252,7 +1084,7 @@ declare namespace ts {
1252
1084
  extraFileExtensions?: FileExtensionInfo[];
1253
1085
  watchOptions?: WatchOptions;
1254
1086
  }
1255
- enum WatchFileKind {
1087
+ export enum WatchFileKind {
1256
1088
  FixedPollingInterval = "FixedPollingInterval",
1257
1089
  PriorityPollingInterval = "PriorityPollingInterval",
1258
1090
  DynamicPriorityPolling = "DynamicPriorityPolling",
@@ -1260,19 +1092,19 @@ declare namespace ts {
1260
1092
  UseFsEvents = "UseFsEvents",
1261
1093
  UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory",
1262
1094
  }
1263
- enum WatchDirectoryKind {
1095
+ export enum WatchDirectoryKind {
1264
1096
  UseFsEvents = "UseFsEvents",
1265
1097
  FixedPollingInterval = "FixedPollingInterval",
1266
1098
  DynamicPriorityPolling = "DynamicPriorityPolling",
1267
1099
  FixedChunkSizePolling = "FixedChunkSizePolling",
1268
1100
  }
1269
- enum PollingWatchKind {
1101
+ export enum PollingWatchKind {
1270
1102
  FixedInterval = "FixedInterval",
1271
1103
  PriorityInterval = "PriorityInterval",
1272
1104
  DynamicPriority = "DynamicPriority",
1273
1105
  FixedChunkSize = "FixedChunkSize",
1274
1106
  }
1275
- interface WatchOptions {
1107
+ export interface WatchOptions {
1276
1108
  watchFile?: WatchFileKind | ts.WatchFileKind;
1277
1109
  watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind;
1278
1110
  fallbackPolling?: PollingWatchKind | ts.PollingWatchKind;
@@ -1285,7 +1117,7 @@ declare namespace ts {
1285
1117
  * Configure request; value of command field is "configure". Specifies
1286
1118
  * host information, such as host type, tab size, and indent size.
1287
1119
  */
1288
- interface ConfigureRequest extends Request {
1120
+ export interface ConfigureRequest extends Request {
1289
1121
  command: CommandTypes.Configure;
1290
1122
  arguments: ConfigureRequestArguments;
1291
1123
  }
@@ -1293,52 +1125,52 @@ declare namespace ts {
1293
1125
  * Response to "configure" request. This is just an acknowledgement, so
1294
1126
  * no body field is required.
1295
1127
  */
1296
- interface ConfigureResponse extends Response {
1128
+ export interface ConfigureResponse extends Response {
1297
1129
  }
1298
- interface ConfigurePluginRequestArguments {
1130
+ export interface ConfigurePluginRequestArguments {
1299
1131
  pluginName: string;
1300
1132
  configuration: any;
1301
1133
  }
1302
- interface ConfigurePluginRequest extends Request {
1134
+ export interface ConfigurePluginRequest extends Request {
1303
1135
  command: CommandTypes.ConfigurePlugin;
1304
1136
  arguments: ConfigurePluginRequestArguments;
1305
1137
  }
1306
- interface ConfigurePluginResponse extends Response {
1138
+ export interface ConfigurePluginResponse extends Response {
1307
1139
  }
1308
- interface SelectionRangeRequest extends FileRequest {
1140
+ export interface SelectionRangeRequest extends FileRequest {
1309
1141
  command: CommandTypes.SelectionRange;
1310
1142
  arguments: SelectionRangeRequestArgs;
1311
1143
  }
1312
- interface SelectionRangeRequestArgs extends FileRequestArgs {
1144
+ export interface SelectionRangeRequestArgs extends FileRequestArgs {
1313
1145
  locations: Location[];
1314
1146
  }
1315
- interface SelectionRangeResponse extends Response {
1147
+ export interface SelectionRangeResponse extends Response {
1316
1148
  body?: SelectionRange[];
1317
1149
  }
1318
- interface SelectionRange {
1150
+ export interface SelectionRange {
1319
1151
  textSpan: TextSpan;
1320
1152
  parent?: SelectionRange;
1321
1153
  }
1322
- interface ToggleLineCommentRequest extends FileRequest {
1154
+ export interface ToggleLineCommentRequest extends FileRequest {
1323
1155
  command: CommandTypes.ToggleLineComment;
1324
1156
  arguments: FileRangeRequestArgs;
1325
1157
  }
1326
- interface ToggleMultilineCommentRequest extends FileRequest {
1158
+ export interface ToggleMultilineCommentRequest extends FileRequest {
1327
1159
  command: CommandTypes.ToggleMultilineComment;
1328
1160
  arguments: FileRangeRequestArgs;
1329
1161
  }
1330
- interface CommentSelectionRequest extends FileRequest {
1162
+ export interface CommentSelectionRequest extends FileRequest {
1331
1163
  command: CommandTypes.CommentSelection;
1332
1164
  arguments: FileRangeRequestArgs;
1333
1165
  }
1334
- interface UncommentSelectionRequest extends FileRequest {
1166
+ export interface UncommentSelectionRequest extends FileRequest {
1335
1167
  command: CommandTypes.UncommentSelection;
1336
1168
  arguments: FileRangeRequestArgs;
1337
1169
  }
1338
1170
  /**
1339
1171
  * Information found in an "open" request.
1340
1172
  */
1341
- interface OpenRequestArgs extends FileRequestArgs {
1173
+ export interface OpenRequestArgs extends FileRequestArgs {
1342
1174
  /**
1343
1175
  * Used when a version of the file content is known to be more up to date than the one on disk.
1344
1176
  * Then the known content will be used upon opening instead of the disk copy
@@ -1355,7 +1187,7 @@ declare namespace ts {
1355
1187
  */
1356
1188
  projectRootPath?: string;
1357
1189
  }
1358
- type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
1190
+ export type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
1359
1191
  /**
1360
1192
  * Open request; value of command field is "open". Notify the
1361
1193
  * server that the client has file open. The server will not
@@ -1364,32 +1196,32 @@ declare namespace ts {
1364
1196
  * reload messages) when the file changes. Server does not currently
1365
1197
  * send a response to an open request.
1366
1198
  */
1367
- interface OpenRequest extends Request {
1199
+ export interface OpenRequest extends Request {
1368
1200
  command: CommandTypes.Open;
1369
1201
  arguments: OpenRequestArgs;
1370
1202
  }
1371
1203
  /**
1372
1204
  * Request to open or update external project
1373
1205
  */
1374
- interface OpenExternalProjectRequest extends Request {
1206
+ export interface OpenExternalProjectRequest extends Request {
1375
1207
  command: CommandTypes.OpenExternalProject;
1376
1208
  arguments: OpenExternalProjectArgs;
1377
1209
  }
1378
1210
  /**
1379
1211
  * Arguments to OpenExternalProjectRequest request
1380
1212
  */
1381
- type OpenExternalProjectArgs = ExternalProject;
1213
+ export type OpenExternalProjectArgs = ExternalProject;
1382
1214
  /**
1383
1215
  * Request to open multiple external projects
1384
1216
  */
1385
- interface OpenExternalProjectsRequest extends Request {
1217
+ export interface OpenExternalProjectsRequest extends Request {
1386
1218
  command: CommandTypes.OpenExternalProjects;
1387
1219
  arguments: OpenExternalProjectsArgs;
1388
1220
  }
1389
1221
  /**
1390
1222
  * Arguments to OpenExternalProjectsRequest
1391
1223
  */
1392
- interface OpenExternalProjectsArgs {
1224
+ export interface OpenExternalProjectsArgs {
1393
1225
  /**
1394
1226
  * List of external projects to open or update
1395
1227
  */
@@ -1399,25 +1231,25 @@ declare namespace ts {
1399
1231
  * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so
1400
1232
  * no body field is required.
1401
1233
  */
1402
- interface OpenExternalProjectResponse extends Response {
1234
+ export interface OpenExternalProjectResponse extends Response {
1403
1235
  }
1404
1236
  /**
1405
1237
  * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so
1406
1238
  * no body field is required.
1407
1239
  */
1408
- interface OpenExternalProjectsResponse extends Response {
1240
+ export interface OpenExternalProjectsResponse extends Response {
1409
1241
  }
1410
1242
  /**
1411
1243
  * Request to close external project.
1412
1244
  */
1413
- interface CloseExternalProjectRequest extends Request {
1245
+ export interface CloseExternalProjectRequest extends Request {
1414
1246
  command: CommandTypes.CloseExternalProject;
1415
1247
  arguments: CloseExternalProjectRequestArgs;
1416
1248
  }
1417
1249
  /**
1418
1250
  * Arguments to CloseExternalProjectRequest request
1419
1251
  */
1420
- interface CloseExternalProjectRequestArgs {
1252
+ export interface CloseExternalProjectRequestArgs {
1421
1253
  /**
1422
1254
  * Name of the project to close
1423
1255
  */
@@ -1427,19 +1259,19 @@ declare namespace ts {
1427
1259
  * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so
1428
1260
  * no body field is required.
1429
1261
  */
1430
- interface CloseExternalProjectResponse extends Response {
1262
+ export interface CloseExternalProjectResponse extends Response {
1431
1263
  }
1432
1264
  /**
1433
1265
  * Request to synchronize list of open files with the client
1434
1266
  */
1435
- interface UpdateOpenRequest extends Request {
1267
+ export interface UpdateOpenRequest extends Request {
1436
1268
  command: CommandTypes.UpdateOpen;
1437
1269
  arguments: UpdateOpenRequestArgs;
1438
1270
  }
1439
1271
  /**
1440
1272
  * Arguments to UpdateOpenRequest
1441
1273
  */
1442
- interface UpdateOpenRequestArgs {
1274
+ export interface UpdateOpenRequestArgs {
1443
1275
  /**
1444
1276
  * List of newly open files
1445
1277
  */
@@ -1456,7 +1288,7 @@ declare namespace ts {
1456
1288
  /**
1457
1289
  * External projects have a typeAcquisition option so they need to be added separately to compiler options for inferred projects.
1458
1290
  */
1459
- type InferredProjectCompilerOptions = ExternalProjectCompilerOptions & TypeAcquisition;
1291
+ export type InferredProjectCompilerOptions = ExternalProjectCompilerOptions & TypeAcquisition;
1460
1292
  /**
1461
1293
  * Request to set compiler options for inferred projects.
1462
1294
  * External projects are opened / closed explicitly.
@@ -1466,14 +1298,14 @@ declare namespace ts {
1466
1298
  * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false,
1467
1299
  * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true.
1468
1300
  */
1469
- interface SetCompilerOptionsForInferredProjectsRequest extends Request {
1301
+ export interface SetCompilerOptionsForInferredProjectsRequest extends Request {
1470
1302
  command: CommandTypes.CompilerOptionsForInferredProjects;
1471
1303
  arguments: SetCompilerOptionsForInferredProjectsArgs;
1472
1304
  }
1473
1305
  /**
1474
1306
  * Argument for SetCompilerOptionsForInferredProjectsRequest request.
1475
1307
  */
1476
- interface SetCompilerOptionsForInferredProjectsArgs {
1308
+ export interface SetCompilerOptionsForInferredProjectsArgs {
1477
1309
  /**
1478
1310
  * Compiler options to be used with inferred projects.
1479
1311
  */
@@ -1489,13 +1321,13 @@ declare namespace ts {
1489
1321
  * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
1490
1322
  * no body field is required.
1491
1323
  */
1492
- interface SetCompilerOptionsForInferredProjectsResponse extends Response {
1324
+ export interface SetCompilerOptionsForInferredProjectsResponse extends Response {
1493
1325
  }
1494
1326
  /**
1495
1327
  * Exit request; value of command field is "exit". Ask the server process
1496
1328
  * to exit.
1497
1329
  */
1498
- interface ExitRequest extends Request {
1330
+ export interface ExitRequest extends Request {
1499
1331
  command: CommandTypes.Exit;
1500
1332
  }
1501
1333
  /**
@@ -1505,14 +1337,14 @@ declare namespace ts {
1505
1337
  * monitoring the filesystem for changes to file. Server does not
1506
1338
  * currently send a response to a close request.
1507
1339
  */
1508
- interface CloseRequest extends FileRequest {
1340
+ export interface CloseRequest extends FileRequest {
1509
1341
  command: CommandTypes.Close;
1510
1342
  }
1511
- interface WatchChangeRequest extends Request {
1343
+ export interface WatchChangeRequest extends Request {
1512
1344
  command: CommandTypes.WatchChange;
1513
1345
  arguments: WatchChangeRequestArgs;
1514
1346
  }
1515
- interface WatchChangeRequestArgs {
1347
+ export interface WatchChangeRequestArgs {
1516
1348
  id: number;
1517
1349
  path: string;
1518
1350
  eventType: "create" | "delete" | "update";
@@ -1521,13 +1353,13 @@ declare namespace ts {
1521
1353
  * Request to obtain the list of files that should be regenerated if target file is recompiled.
1522
1354
  * NOTE: this us query-only operation and does not generate any output on disk.
1523
1355
  */
1524
- interface CompileOnSaveAffectedFileListRequest extends FileRequest {
1356
+ export interface CompileOnSaveAffectedFileListRequest extends FileRequest {
1525
1357
  command: CommandTypes.CompileOnSaveAffectedFileList;
1526
1358
  }
1527
1359
  /**
1528
1360
  * Contains a list of files that should be regenerated in a project
1529
1361
  */
1530
- interface CompileOnSaveAffectedFileListSingleProject {
1362
+ export interface CompileOnSaveAffectedFileListSingleProject {
1531
1363
  /**
1532
1364
  * Project name
1533
1365
  */
@@ -1544,20 +1376,20 @@ declare namespace ts {
1544
1376
  /**
1545
1377
  * Response for CompileOnSaveAffectedFileListRequest request;
1546
1378
  */
1547
- interface CompileOnSaveAffectedFileListResponse extends Response {
1379
+ export interface CompileOnSaveAffectedFileListResponse extends Response {
1548
1380
  body: CompileOnSaveAffectedFileListSingleProject[];
1549
1381
  }
1550
1382
  /**
1551
1383
  * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk.
1552
1384
  */
1553
- interface CompileOnSaveEmitFileRequest extends FileRequest {
1385
+ export interface CompileOnSaveEmitFileRequest extends FileRequest {
1554
1386
  command: CommandTypes.CompileOnSaveEmitFile;
1555
1387
  arguments: CompileOnSaveEmitFileRequestArgs;
1556
1388
  }
1557
1389
  /**
1558
1390
  * Arguments for CompileOnSaveEmitFileRequest
1559
1391
  */
1560
- interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
1392
+ export interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
1561
1393
  /**
1562
1394
  * if true - then file should be recompiled even if it does not have any changes.
1563
1395
  */
@@ -1566,10 +1398,10 @@ declare namespace ts {
1566
1398
  /** if true - return response as object with emitSkipped and diagnostics */
1567
1399
  richResponse?: boolean;
1568
1400
  }
1569
- interface CompileOnSaveEmitFileResponse extends Response {
1401
+ export interface CompileOnSaveEmitFileResponse extends Response {
1570
1402
  body: boolean | EmitResult;
1571
1403
  }
1572
- interface EmitResult {
1404
+ export interface EmitResult {
1573
1405
  emitSkipped: boolean;
1574
1406
  diagnostics: Diagnostic[] | DiagnosticWithLinePosition[];
1575
1407
  }
@@ -1579,14 +1411,14 @@ declare namespace ts {
1579
1411
  * documentation string for the symbol found in file at location
1580
1412
  * line, col.
1581
1413
  */
1582
- interface QuickInfoRequest extends FileLocationRequest {
1414
+ export interface QuickInfoRequest extends FileLocationRequest {
1583
1415
  command: CommandTypes.Quickinfo;
1584
1416
  arguments: FileLocationRequestArgs;
1585
1417
  }
1586
1418
  /**
1587
1419
  * Body of QuickInfoResponse.
1588
1420
  */
1589
- interface QuickInfoResponseBody {
1421
+ export interface QuickInfoResponseBody {
1590
1422
  /**
1591
1423
  * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
1592
1424
  */
@@ -1620,13 +1452,13 @@ declare namespace ts {
1620
1452
  /**
1621
1453
  * Quickinfo response message.
1622
1454
  */
1623
- interface QuickInfoResponse extends Response {
1455
+ export interface QuickInfoResponse extends Response {
1624
1456
  body?: QuickInfoResponseBody;
1625
1457
  }
1626
1458
  /**
1627
1459
  * Arguments for format messages.
1628
1460
  */
1629
- interface FormatRequestArgs extends FileLocationRequestArgs {
1461
+ export interface FormatRequestArgs extends FileLocationRequestArgs {
1630
1462
  /**
1631
1463
  * Last line of range for which to format text in file.
1632
1464
  */
@@ -1647,7 +1479,7 @@ declare namespace ts {
1647
1479
  * instructions in reverse to file will result in correctly
1648
1480
  * reformatted text.
1649
1481
  */
1650
- interface FormatRequest extends FileLocationRequest {
1482
+ export interface FormatRequest extends FileLocationRequest {
1651
1483
  command: CommandTypes.Format;
1652
1484
  arguments: FormatRequestArgs;
1653
1485
  }
@@ -1658,7 +1490,7 @@ declare namespace ts {
1658
1490
  * ending one character before end with newText. For an insertion,
1659
1491
  * the text span is empty. For a deletion, newText is empty.
1660
1492
  */
1661
- interface CodeEdit {
1493
+ export interface CodeEdit {
1662
1494
  /**
1663
1495
  * First character of the text span to edit.
1664
1496
  */
@@ -1673,15 +1505,15 @@ declare namespace ts {
1673
1505
  */
1674
1506
  newText: string;
1675
1507
  }
1676
- interface FileCodeEdits {
1508
+ export interface FileCodeEdits {
1677
1509
  fileName: string;
1678
1510
  textChanges: CodeEdit[];
1679
1511
  }
1680
- interface CodeFixResponse extends Response {
1512
+ export interface CodeFixResponse extends Response {
1681
1513
  /** The code actions that are available */
1682
1514
  body?: CodeFixAction[];
1683
1515
  }
1684
- interface CodeAction {
1516
+ export interface CodeAction {
1685
1517
  /** Description of the code action to display in the UI of the editor */
1686
1518
  description: string;
1687
1519
  /** Text changes to apply to each file as part of the code action */
@@ -1689,11 +1521,11 @@ declare namespace ts {
1689
1521
  /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification. */
1690
1522
  commands?: {}[];
1691
1523
  }
1692
- interface CombinedCodeActions {
1524
+ export interface CombinedCodeActions {
1693
1525
  changes: readonly FileCodeEdits[];
1694
1526
  commands?: readonly {}[];
1695
1527
  }
1696
- interface CodeFixAction extends CodeAction {
1528
+ export interface CodeFixAction extends CodeAction {
1697
1529
  /** Short name to identify the fix, for use by telemetry. */
1698
1530
  fixName: string;
1699
1531
  /**
@@ -1707,13 +1539,13 @@ declare namespace ts {
1707
1539
  /**
1708
1540
  * Format and format on key response message.
1709
1541
  */
1710
- interface FormatResponse extends Response {
1542
+ export interface FormatResponse extends Response {
1711
1543
  body?: CodeEdit[];
1712
1544
  }
1713
1545
  /**
1714
1546
  * Arguments for format on key messages.
1715
1547
  */
1716
- interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
1548
+ export interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
1717
1549
  /**
1718
1550
  * Key pressed (';', '\n', or '}').
1719
1551
  */
@@ -1728,23 +1560,14 @@ declare namespace ts {
1728
1560
  * edit instructions in reverse to file will result in correctly
1729
1561
  * reformatted text.
1730
1562
  */
1731
- interface FormatOnKeyRequest extends FileLocationRequest {
1563
+ export interface FormatOnKeyRequest extends FileLocationRequest {
1732
1564
  command: CommandTypes.Formatonkey;
1733
1565
  arguments: FormatOnKeyRequestArgs;
1734
1566
  }
1735
- type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
1736
- enum CompletionTriggerKind {
1737
- /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */
1738
- Invoked = 1,
1739
- /** Completion was triggered by a trigger character. */
1740
- TriggerCharacter = 2,
1741
- /** Completion was re-triggered as the current completion list is incomplete. */
1742
- TriggerForIncompleteCompletions = 3,
1743
- }
1744
1567
  /**
1745
1568
  * Arguments for completions messages.
1746
1569
  */
1747
- interface CompletionsRequestArgs extends FileLocationRequestArgs {
1570
+ export interface CompletionsRequestArgs extends FileLocationRequestArgs {
1748
1571
  /**
1749
1572
  * Optional prefix to apply to possible completions.
1750
1573
  */
@@ -1770,20 +1593,20 @@ declare namespace ts {
1770
1593
  * be the empty string), return the possible completions that
1771
1594
  * begin with prefix.
1772
1595
  */
1773
- interface CompletionsRequest extends FileLocationRequest {
1596
+ export interface CompletionsRequest extends FileLocationRequest {
1774
1597
  command: CommandTypes.Completions | CommandTypes.CompletionInfo;
1775
1598
  arguments: CompletionsRequestArgs;
1776
1599
  }
1777
1600
  /**
1778
1601
  * Arguments for completion details request.
1779
1602
  */
1780
- interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
1603
+ export interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
1781
1604
  /**
1782
1605
  * Names of one or more entries for which to obtain details.
1783
1606
  */
1784
1607
  entryNames: (string | CompletionEntryIdentifier)[];
1785
1608
  }
1786
- interface CompletionEntryIdentifier {
1609
+ export interface CompletionEntryIdentifier {
1787
1610
  name: string;
1788
1611
  source?: string;
1789
1612
  data?: unknown;
@@ -1794,252 +1617,50 @@ declare namespace ts {
1794
1617
  * col) and an array of completion entry names return more
1795
1618
  * detailed information for each completion entry.
1796
1619
  */
1797
- interface CompletionDetailsRequest extends FileLocationRequest {
1620
+ export interface CompletionDetailsRequest extends FileLocationRequest {
1798
1621
  command: CommandTypes.CompletionDetails;
1799
1622
  arguments: CompletionDetailsRequestArgs;
1800
1623
  }
1801
- /**
1802
- * Part of a symbol description.
1803
- */
1804
- interface SymbolDisplayPart {
1805
- /**
1806
- * Text of an item describing the symbol.
1807
- */
1808
- text: string;
1809
- /**
1810
- * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
1811
- */
1812
- kind: string;
1813
- }
1814
1624
  /** A part of a symbol description that links from a jsdoc @link tag to a declaration */
1815
- interface JSDocLinkDisplayPart extends SymbolDisplayPart {
1625
+ export interface JSDocLinkDisplayPart extends SymbolDisplayPart {
1816
1626
  /** The location of the declaration that the @link tag links to. */
1817
1627
  target: FileSpan;
1818
1628
  }
1819
- /**
1820
- * An item found in a completion response.
1821
- */
1822
- interface CompletionEntry {
1823
- /**
1824
- * The symbol's name.
1825
- */
1826
- name: string;
1827
- /**
1828
- * The symbol's kind (such as 'className' or 'parameterName').
1829
- */
1830
- kind: ScriptElementKind;
1831
- /**
1832
- * Optional modifiers for the kind (such as 'public').
1833
- */
1834
- kindModifiers?: string;
1835
- /**
1836
- * A string that is used for comparing completion items so that they can be ordered. This
1837
- * is often the same as the name but may be different in certain circumstances.
1838
- */
1839
- sortText: string;
1840
- /**
1841
- * Text to insert instead of `name`.
1842
- * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`,
1843
- * coupled with `replacementSpan` to replace a dotted access with a bracket access.
1844
- */
1845
- insertText?: string;
1846
- /**
1847
- * A string that should be used when filtering a set of
1848
- * completion items.
1849
- */
1850
- filterText?: string;
1851
- /**
1852
- * `insertText` should be interpreted as a snippet if true.
1853
- */
1854
- isSnippet?: true;
1855
- /**
1856
- * An optional span that indicates the text to be replaced by this completion item.
1857
- * If present, this span should be used instead of the default one.
1858
- * It will be set if the required span differs from the one generated by the default replacement behavior.
1859
- */
1860
- replacementSpan?: TextSpan;
1861
- /**
1862
- * Indicates whether commiting this completion entry will require additional code actions to be
1863
- * made to avoid errors. The CompletionEntryDetails will have these actions.
1864
- */
1865
- hasAction?: true;
1866
- /**
1867
- * Identifier (not necessarily human-readable) identifying where this completion came from.
1868
- */
1869
- source?: string;
1870
- /**
1871
- * Human-readable description of the `source`.
1872
- */
1873
- sourceDisplay?: SymbolDisplayPart[];
1874
- /**
1875
- * Additional details for the label.
1876
- */
1877
- labelDetails?: CompletionEntryLabelDetails;
1878
- /**
1879
- * If true, this completion should be highlighted as recommended. There will only be one of these.
1880
- * This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class.
1881
- * Then either that enum/class or a namespace containing it will be the recommended symbol.
1882
- */
1883
- isRecommended?: true;
1884
- /**
1885
- * If true, this completion was generated from traversing the name table of an unchecked JS file,
1886
- * and therefore may not be accurate.
1887
- */
1888
- isFromUncheckedFile?: true;
1889
- /**
1890
- * If true, this completion was for an auto-import of a module not yet in the program, but listed
1891
- * in the project package.json. Used for telemetry reporting.
1892
- */
1893
- isPackageJsonImport?: true;
1894
- /**
1895
- * If true, this completion was an auto-import-style completion of an import statement (i.e., the
1896
- * module specifier was inserted along with the imported identifier). Used for telemetry reporting.
1897
- */
1898
- isImportStatementCompletion?: true;
1899
- /**
1900
- * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
1901
- * that allows TS Server to look up the symbol represented by the completion item, disambiguating
1902
- * items with the same name.
1903
- */
1904
- data?: unknown;
1905
- }
1906
- interface CompletionEntryLabelDetails {
1907
- /**
1908
- * An optional string which is rendered less prominently directly after
1909
- * {@link CompletionEntry.name name}, without any spacing. Should be
1910
- * used for function signatures or type annotations.
1911
- */
1912
- detail?: string;
1913
- /**
1914
- * An optional string which is rendered less prominently after
1915
- * {@link CompletionEntryLabelDetails.detail}. Should be used for fully qualified
1916
- * names or file path.
1917
- */
1918
- description?: string;
1919
- }
1629
+ export type CompletionEntry = ChangePropertyTypes<Omit<ts.CompletionEntry, "symbol">, {
1630
+ replacementSpan: TextSpan;
1631
+ data: unknown;
1632
+ }>;
1920
1633
  /**
1921
1634
  * Additional completion entry details, available on demand
1922
1635
  */
1923
- interface CompletionEntryDetails {
1924
- /**
1925
- * The symbol's name.
1926
- */
1927
- name: string;
1928
- /**
1929
- * The symbol's kind (such as 'className' or 'parameterName').
1930
- */
1931
- kind: ScriptElementKind;
1932
- /**
1933
- * Optional modifiers for the kind (such as 'public').
1934
- */
1935
- kindModifiers: string;
1936
- /**
1937
- * Display parts of the symbol (similar to quick info).
1938
- */
1939
- displayParts: SymbolDisplayPart[];
1940
- /**
1941
- * Documentation strings for the symbol.
1942
- */
1943
- documentation?: SymbolDisplayPart[];
1944
- /**
1945
- * JSDoc tags for the symbol.
1946
- */
1947
- tags?: JSDocTagInfo[];
1948
- /**
1949
- * The associated code actions for this entry
1950
- */
1951
- codeActions?: CodeAction[];
1952
- /**
1953
- * @deprecated Use `sourceDisplay` instead.
1954
- */
1955
- source?: SymbolDisplayPart[];
1956
- /**
1957
- * Human-readable description of the `source` from the CompletionEntry.
1958
- */
1959
- sourceDisplay?: SymbolDisplayPart[];
1960
- }
1636
+ export type CompletionEntryDetails = ChangePropertyTypes<ts.CompletionEntryDetails, {
1637
+ tags: JSDocTagInfo[];
1638
+ codeActions: CodeAction[];
1639
+ }>;
1961
1640
  /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */
1962
- interface CompletionsResponse extends Response {
1641
+ export interface CompletionsResponse extends Response {
1963
1642
  body?: CompletionEntry[];
1964
1643
  }
1965
- interface CompletionInfoResponse extends Response {
1644
+ export interface CompletionInfoResponse extends Response {
1966
1645
  body?: CompletionInfo;
1967
1646
  }
1968
- interface CompletionInfo {
1969
- readonly flags?: number;
1970
- readonly isGlobalCompletion: boolean;
1971
- readonly isMemberCompletion: boolean;
1972
- readonly isNewIdentifierLocation: boolean;
1973
- /**
1974
- * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use
1975
- * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span
1976
- * must be used to commit that completion entry.
1977
- */
1978
- readonly optionalReplacementSpan?: TextSpan;
1979
- readonly isIncomplete?: boolean;
1980
- readonly entries: readonly CompletionEntry[];
1981
- }
1982
- interface CompletionDetailsResponse extends Response {
1647
+ export type CompletionInfo = ChangePropertyTypes<ts.CompletionInfo, {
1648
+ entries: readonly CompletionEntry[];
1649
+ optionalReplacementSpan: TextSpan;
1650
+ }>;
1651
+ export interface CompletionDetailsResponse extends Response {
1983
1652
  body?: CompletionEntryDetails[];
1984
1653
  }
1985
- /**
1986
- * Signature help information for a single parameter
1987
- */
1988
- interface SignatureHelpParameter {
1989
- /**
1990
- * The parameter's name
1991
- */
1992
- name: string;
1993
- /**
1994
- * Documentation of the parameter.
1995
- */
1996
- documentation: SymbolDisplayPart[];
1997
- /**
1998
- * Display parts of the parameter.
1999
- */
2000
- displayParts: SymbolDisplayPart[];
2001
- /**
2002
- * Whether the parameter is optional or not.
2003
- */
2004
- isOptional: boolean;
2005
- }
2006
1654
  /**
2007
1655
  * Represents a single signature to show in signature help.
2008
1656
  */
2009
- interface SignatureHelpItem {
2010
- /**
2011
- * Whether the signature accepts a variable number of arguments.
2012
- */
2013
- isVariadic: boolean;
2014
- /**
2015
- * The prefix display parts.
2016
- */
2017
- prefixDisplayParts: SymbolDisplayPart[];
2018
- /**
2019
- * The suffix display parts.
2020
- */
2021
- suffixDisplayParts: SymbolDisplayPart[];
2022
- /**
2023
- * The separator display parts.
2024
- */
2025
- separatorDisplayParts: SymbolDisplayPart[];
2026
- /**
2027
- * The signature helps items for the parameters.
2028
- */
2029
- parameters: SignatureHelpParameter[];
2030
- /**
2031
- * The signature's documentation
2032
- */
2033
- documentation: SymbolDisplayPart[];
2034
- /**
2035
- * The signature's JSDoc tags
2036
- */
1657
+ export type SignatureHelpItem = ChangePropertyTypes<ts.SignatureHelpItem, {
2037
1658
  tags: JSDocTagInfo[];
2038
- }
1659
+ }>;
2039
1660
  /**
2040
1661
  * Signature help items found in the response of a signature help request.
2041
1662
  */
2042
- interface SignatureHelpItems {
1663
+ export interface SignatureHelpItems {
2043
1664
  /**
2044
1665
  * The signature help items.
2045
1666
  */
@@ -2061,68 +1682,32 @@ declare namespace ts {
2061
1682
  */
2062
1683
  argumentCount: number;
2063
1684
  }
2064
- type SignatureHelpTriggerCharacter = "," | "(" | "<";
2065
- type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
2066
1685
  /**
2067
1686
  * Arguments of a signature help request.
2068
1687
  */
2069
- interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
1688
+ export interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
2070
1689
  /**
2071
1690
  * Reason why signature help was invoked.
2072
1691
  * See each individual possible
2073
1692
  */
2074
1693
  triggerReason?: SignatureHelpTriggerReason;
2075
1694
  }
2076
- type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
2077
- /**
2078
- * Signals that the user manually requested signature help.
2079
- * The language service will unconditionally attempt to provide a result.
2080
- */
2081
- interface SignatureHelpInvokedReason {
2082
- kind: "invoked";
2083
- triggerCharacter?: undefined;
2084
- }
2085
- /**
2086
- * Signals that the signature help request came from a user typing a character.
2087
- * Depending on the character and the syntactic context, the request may or may not be served a result.
2088
- */
2089
- interface SignatureHelpCharacterTypedReason {
2090
- kind: "characterTyped";
2091
- /**
2092
- * Character that was responsible for triggering signature help.
2093
- */
2094
- triggerCharacter: SignatureHelpTriggerCharacter;
2095
- }
2096
- /**
2097
- * Signals that this signature help request came from typing a character or moving the cursor.
2098
- * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
2099
- * The language service will unconditionally attempt to provide a result.
2100
- * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
2101
- */
2102
- interface SignatureHelpRetriggeredReason {
2103
- kind: "retrigger";
2104
- /**
2105
- * Character that was responsible for triggering signature help.
2106
- */
2107
- triggerCharacter?: SignatureHelpRetriggerCharacter;
2108
- }
2109
1695
  /**
2110
1696
  * Signature help request; value of command field is "signatureHelp".
2111
1697
  * Given a file location (file, line, col), return the signature
2112
1698
  * help.
2113
1699
  */
2114
- interface SignatureHelpRequest extends FileLocationRequest {
1700
+ export interface SignatureHelpRequest extends FileLocationRequest {
2115
1701
  command: CommandTypes.SignatureHelp;
2116
1702
  arguments: SignatureHelpRequestArgs;
2117
1703
  }
2118
1704
  /**
2119
1705
  * Response object for a SignatureHelpRequest.
2120
1706
  */
2121
- interface SignatureHelpResponse extends Response {
1707
+ export interface SignatureHelpResponse extends Response {
2122
1708
  body?: SignatureHelpItems;
2123
1709
  }
2124
- type InlayHintKind = "Type" | "Parameter" | "Enum";
2125
- interface InlayHintsRequestArgs extends FileRequestArgs {
1710
+ export interface InlayHintsRequestArgs extends FileRequestArgs {
2126
1711
  /**
2127
1712
  * Start position of the span.
2128
1713
  */
@@ -2132,68 +1717,63 @@ declare namespace ts {
2132
1717
  */
2133
1718
  length: number;
2134
1719
  }
2135
- interface InlayHintsRequest extends Request {
1720
+ export interface InlayHintsRequest extends Request {
2136
1721
  command: CommandTypes.ProvideInlayHints;
2137
1722
  arguments: InlayHintsRequestArgs;
2138
1723
  }
2139
- interface InlayHintItem {
2140
- /** This property will be the empty string when displayParts is set. */
2141
- text: string;
1724
+ export type InlayHintItem = ChangePropertyTypes<ts.InlayHint, {
2142
1725
  position: Location;
2143
- kind: InlayHintKind;
2144
- whitespaceBefore?: boolean;
2145
- whitespaceAfter?: boolean;
2146
- displayParts?: InlayHintItemDisplayPart[];
2147
- }
2148
- interface InlayHintItemDisplayPart {
1726
+ displayParts: InlayHintItemDisplayPart[];
1727
+ }>;
1728
+ export interface InlayHintItemDisplayPart {
2149
1729
  text: string;
2150
1730
  span?: FileSpan;
2151
1731
  }
2152
- interface InlayHintsResponse extends Response {
1732
+ export interface InlayHintsResponse extends Response {
2153
1733
  body?: InlayHintItem[];
2154
1734
  }
2155
1735
  /**
2156
1736
  * Synchronous request for semantic diagnostics of one file.
2157
1737
  */
2158
- interface SemanticDiagnosticsSyncRequest extends FileRequest {
1738
+ export interface SemanticDiagnosticsSyncRequest extends FileRequest {
2159
1739
  command: CommandTypes.SemanticDiagnosticsSync;
2160
1740
  arguments: SemanticDiagnosticsSyncRequestArgs;
2161
1741
  }
2162
- interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1742
+ export interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
2163
1743
  includeLinePosition?: boolean;
2164
1744
  }
2165
1745
  /**
2166
1746
  * Response object for synchronous sematic diagnostics request.
2167
1747
  */
2168
- interface SemanticDiagnosticsSyncResponse extends Response {
1748
+ export interface SemanticDiagnosticsSyncResponse extends Response {
2169
1749
  body?: Diagnostic[] | DiagnosticWithLinePosition[];
2170
1750
  }
2171
- interface SuggestionDiagnosticsSyncRequest extends FileRequest {
1751
+ export interface SuggestionDiagnosticsSyncRequest extends FileRequest {
2172
1752
  command: CommandTypes.SuggestionDiagnosticsSync;
2173
1753
  arguments: SuggestionDiagnosticsSyncRequestArgs;
2174
1754
  }
2175
- type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs;
2176
- type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse;
1755
+ export type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs;
1756
+ export type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse;
2177
1757
  /**
2178
1758
  * Synchronous request for syntactic diagnostics of one file.
2179
1759
  */
2180
- interface SyntacticDiagnosticsSyncRequest extends FileRequest {
1760
+ export interface SyntacticDiagnosticsSyncRequest extends FileRequest {
2181
1761
  command: CommandTypes.SyntacticDiagnosticsSync;
2182
1762
  arguments: SyntacticDiagnosticsSyncRequestArgs;
2183
1763
  }
2184
- interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1764
+ export interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
2185
1765
  includeLinePosition?: boolean;
2186
1766
  }
2187
1767
  /**
2188
1768
  * Response object for synchronous syntactic diagnostics request.
2189
1769
  */
2190
- interface SyntacticDiagnosticsSyncResponse extends Response {
1770
+ export interface SyntacticDiagnosticsSyncResponse extends Response {
2191
1771
  body?: Diagnostic[] | DiagnosticWithLinePosition[];
2192
1772
  }
2193
1773
  /**
2194
1774
  * Arguments for GeterrForProject request.
2195
1775
  */
2196
- interface GeterrForProjectRequestArgs {
1776
+ export interface GeterrForProjectRequestArgs {
2197
1777
  /**
2198
1778
  * the file requesting project error list
2199
1779
  */
@@ -2209,14 +1789,14 @@ declare namespace ts {
2209
1789
  * "geterrForProject". It works similarly with 'Geterr', only
2210
1790
  * it request for every file in this project.
2211
1791
  */
2212
- interface GeterrForProjectRequest extends Request {
1792
+ export interface GeterrForProjectRequest extends Request {
2213
1793
  command: CommandTypes.GeterrForProject;
2214
1794
  arguments: GeterrForProjectRequestArgs;
2215
1795
  }
2216
1796
  /**
2217
1797
  * Arguments for geterr messages.
2218
1798
  */
2219
- interface GeterrRequestArgs {
1799
+ export interface GeterrRequestArgs {
2220
1800
  /**
2221
1801
  * List of file names for which to compute compiler errors.
2222
1802
  * The files will be checked in list order.
@@ -2238,25 +1818,25 @@ declare namespace ts {
2238
1818
  * practice for an editor is to send a file list containing each
2239
1819
  * file that is currently visible, in most-recently-used order.
2240
1820
  */
2241
- interface GeterrRequest extends Request {
1821
+ export interface GeterrRequest extends Request {
2242
1822
  command: CommandTypes.Geterr;
2243
1823
  arguments: GeterrRequestArgs;
2244
1824
  }
2245
- type RequestCompletedEventName = "requestCompleted";
1825
+ export type RequestCompletedEventName = "requestCompleted";
2246
1826
  /**
2247
1827
  * Event that is sent when server have finished processing request with specified id.
2248
1828
  */
2249
- interface RequestCompletedEvent extends Event {
1829
+ export interface RequestCompletedEvent extends Event {
2250
1830
  event: RequestCompletedEventName;
2251
1831
  body: RequestCompletedEventBody;
2252
1832
  }
2253
- interface RequestCompletedEventBody {
1833
+ export interface RequestCompletedEventBody {
2254
1834
  request_seq: number;
2255
1835
  }
2256
1836
  /**
2257
1837
  * Item of diagnostic information found in a DiagnosticEvent message.
2258
1838
  */
2259
- interface Diagnostic {
1839
+ export interface Diagnostic {
2260
1840
  /**
2261
1841
  * Starting file location at which text applies.
2262
1842
  */
@@ -2288,7 +1868,7 @@ declare namespace ts {
2288
1868
  */
2289
1869
  source?: string;
2290
1870
  }
2291
- interface DiagnosticWithFileName extends Diagnostic {
1871
+ export interface DiagnosticWithFileName extends Diagnostic {
2292
1872
  /**
2293
1873
  * Name of the file the diagnostic is in
2294
1874
  */
@@ -2297,7 +1877,7 @@ declare namespace ts {
2297
1877
  /**
2298
1878
  * Represents additional spans returned with a diagnostic which are relevant to it
2299
1879
  */
2300
- interface DiagnosticRelatedInformation {
1880
+ export interface DiagnosticRelatedInformation {
2301
1881
  /**
2302
1882
  * The category of the related information message, e.g. "error", "warning", or "suggestion".
2303
1883
  */
@@ -2315,7 +1895,7 @@ declare namespace ts {
2315
1895
  */
2316
1896
  span?: FileSpan;
2317
1897
  }
2318
- interface DiagnosticEventBody {
1898
+ export interface DiagnosticEventBody {
2319
1899
  /**
2320
1900
  * The file for which diagnostic information is reported.
2321
1901
  */
@@ -2325,16 +1905,16 @@ declare namespace ts {
2325
1905
  */
2326
1906
  diagnostics: Diagnostic[];
2327
1907
  }
2328
- type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag";
1908
+ export type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag";
2329
1909
  /**
2330
1910
  * Event message for DiagnosticEventKind event types.
2331
1911
  * These events provide syntactic and semantic errors for a file.
2332
1912
  */
2333
- interface DiagnosticEvent extends Event {
1913
+ export interface DiagnosticEvent extends Event {
2334
1914
  body?: DiagnosticEventBody;
2335
1915
  event: DiagnosticEventKind;
2336
1916
  }
2337
- interface ConfigFileDiagnosticEventBody {
1917
+ export interface ConfigFileDiagnosticEventBody {
2338
1918
  /**
2339
1919
  * The file which trigged the searching and error-checking of the config file
2340
1920
  */
@@ -2352,16 +1932,16 @@ declare namespace ts {
2352
1932
  * Event message for "configFileDiag" event type.
2353
1933
  * This event provides errors for a found config file.
2354
1934
  */
2355
- interface ConfigFileDiagnosticEvent extends Event {
1935
+ export interface ConfigFileDiagnosticEvent extends Event {
2356
1936
  body?: ConfigFileDiagnosticEventBody;
2357
1937
  event: "configFileDiag";
2358
1938
  }
2359
- type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
2360
- interface ProjectLanguageServiceStateEvent extends Event {
1939
+ export type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
1940
+ export interface ProjectLanguageServiceStateEvent extends Event {
2361
1941
  event: ProjectLanguageServiceStateEventName;
2362
1942
  body?: ProjectLanguageServiceStateEventBody;
2363
1943
  }
2364
- interface ProjectLanguageServiceStateEventBody {
1944
+ export interface ProjectLanguageServiceStateEventBody {
2365
1945
  /**
2366
1946
  * Project name that has changes in the state of language service.
2367
1947
  * For configured projects this will be the config file path.
@@ -2375,52 +1955,52 @@ declare namespace ts {
2375
1955
  */
2376
1956
  languageServiceEnabled: boolean;
2377
1957
  }
2378
- type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground";
2379
- interface ProjectsUpdatedInBackgroundEvent extends Event {
1958
+ export type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground";
1959
+ export interface ProjectsUpdatedInBackgroundEvent extends Event {
2380
1960
  event: ProjectsUpdatedInBackgroundEventName;
2381
1961
  body: ProjectsUpdatedInBackgroundEventBody;
2382
1962
  }
2383
- interface ProjectsUpdatedInBackgroundEventBody {
1963
+ export interface ProjectsUpdatedInBackgroundEventBody {
2384
1964
  /**
2385
1965
  * Current set of open files
2386
1966
  */
2387
1967
  openFiles: string[];
2388
1968
  }
2389
- type ProjectLoadingStartEventName = "projectLoadingStart";
2390
- interface ProjectLoadingStartEvent extends Event {
1969
+ export type ProjectLoadingStartEventName = "projectLoadingStart";
1970
+ export interface ProjectLoadingStartEvent extends Event {
2391
1971
  event: ProjectLoadingStartEventName;
2392
1972
  body: ProjectLoadingStartEventBody;
2393
1973
  }
2394
- interface ProjectLoadingStartEventBody {
1974
+ export interface ProjectLoadingStartEventBody {
2395
1975
  /** name of the project */
2396
1976
  projectName: string;
2397
1977
  /** reason for loading */
2398
1978
  reason: string;
2399
1979
  }
2400
- type ProjectLoadingFinishEventName = "projectLoadingFinish";
2401
- interface ProjectLoadingFinishEvent extends Event {
1980
+ export type ProjectLoadingFinishEventName = "projectLoadingFinish";
1981
+ export interface ProjectLoadingFinishEvent extends Event {
2402
1982
  event: ProjectLoadingFinishEventName;
2403
1983
  body: ProjectLoadingFinishEventBody;
2404
1984
  }
2405
- interface ProjectLoadingFinishEventBody {
1985
+ export interface ProjectLoadingFinishEventBody {
2406
1986
  /** name of the project */
2407
1987
  projectName: string;
2408
1988
  }
2409
- type SurveyReadyEventName = "surveyReady";
2410
- interface SurveyReadyEvent extends Event {
1989
+ export type SurveyReadyEventName = "surveyReady";
1990
+ export interface SurveyReadyEvent extends Event {
2411
1991
  event: SurveyReadyEventName;
2412
1992
  body: SurveyReadyEventBody;
2413
1993
  }
2414
- interface SurveyReadyEventBody {
1994
+ export interface SurveyReadyEventBody {
2415
1995
  /** Name of the survey. This is an internal machine- and programmer-friendly name */
2416
1996
  surveyId: string;
2417
1997
  }
2418
- type LargeFileReferencedEventName = "largeFileReferenced";
2419
- interface LargeFileReferencedEvent extends Event {
1998
+ export type LargeFileReferencedEventName = "largeFileReferenced";
1999
+ export interface LargeFileReferencedEvent extends Event {
2420
2000
  event: LargeFileReferencedEventName;
2421
2001
  body: LargeFileReferencedEventBody;
2422
2002
  }
2423
- interface LargeFileReferencedEventBody {
2003
+ export interface LargeFileReferencedEventBody {
2424
2004
  /**
2425
2005
  * name of the large file being loaded
2426
2006
  */
@@ -2434,37 +2014,37 @@ declare namespace ts {
2434
2014
  */
2435
2015
  maxFileSize: number;
2436
2016
  }
2437
- type CreateFileWatcherEventName = "createFileWatcher";
2438
- interface CreateFileWatcherEvent extends Event {
2017
+ export type CreateFileWatcherEventName = "createFileWatcher";
2018
+ export interface CreateFileWatcherEvent extends Event {
2439
2019
  readonly event: CreateFileWatcherEventName;
2440
2020
  readonly body: CreateFileWatcherEventBody;
2441
2021
  }
2442
- interface CreateFileWatcherEventBody {
2022
+ export interface CreateFileWatcherEventBody {
2443
2023
  readonly id: number;
2444
2024
  readonly path: string;
2445
2025
  }
2446
- type CreateDirectoryWatcherEventName = "createDirectoryWatcher";
2447
- interface CreateDirectoryWatcherEvent extends Event {
2026
+ export type CreateDirectoryWatcherEventName = "createDirectoryWatcher";
2027
+ export interface CreateDirectoryWatcherEvent extends Event {
2448
2028
  readonly event: CreateDirectoryWatcherEventName;
2449
2029
  readonly body: CreateDirectoryWatcherEventBody;
2450
2030
  }
2451
- interface CreateDirectoryWatcherEventBody {
2031
+ export interface CreateDirectoryWatcherEventBody {
2452
2032
  readonly id: number;
2453
2033
  readonly path: string;
2454
2034
  readonly recursive: boolean;
2455
2035
  }
2456
- type CloseFileWatcherEventName = "closeFileWatcher";
2457
- interface CloseFileWatcherEvent extends Event {
2036
+ export type CloseFileWatcherEventName = "closeFileWatcher";
2037
+ export interface CloseFileWatcherEvent extends Event {
2458
2038
  readonly event: CloseFileWatcherEventName;
2459
2039
  readonly body: CloseFileWatcherEventBody;
2460
2040
  }
2461
- interface CloseFileWatcherEventBody {
2041
+ export interface CloseFileWatcherEventBody {
2462
2042
  readonly id: number;
2463
2043
  }
2464
2044
  /**
2465
2045
  * Arguments for reload request.
2466
2046
  */
2467
- interface ReloadRequestArgs extends FileRequestArgs {
2047
+ export interface ReloadRequestArgs extends FileRequestArgs {
2468
2048
  /**
2469
2049
  * Name of temporary file from which to reload file
2470
2050
  * contents. May be same as file.
@@ -2477,7 +2057,7 @@ declare namespace ts {
2477
2057
  * from temporary file with name given by the 'tmpfile' argument.
2478
2058
  * The two names can be identical.
2479
2059
  */
2480
- interface ReloadRequest extends FileRequest {
2060
+ export interface ReloadRequest extends FileRequest {
2481
2061
  command: CommandTypes.Reload;
2482
2062
  arguments: ReloadRequestArgs;
2483
2063
  }
@@ -2485,12 +2065,12 @@ declare namespace ts {
2485
2065
  * Response to "reload" request. This is just an acknowledgement, so
2486
2066
  * no body field is required.
2487
2067
  */
2488
- interface ReloadResponse extends Response {
2068
+ export interface ReloadResponse extends Response {
2489
2069
  }
2490
2070
  /**
2491
2071
  * Arguments for saveto request.
2492
2072
  */
2493
- interface SavetoRequestArgs extends FileRequestArgs {
2073
+ export interface SavetoRequestArgs extends FileRequestArgs {
2494
2074
  /**
2495
2075
  * Name of temporary file into which to save server's view of
2496
2076
  * file contents.
@@ -2504,14 +2084,14 @@ declare namespace ts {
2504
2084
  * 'file'. The server does not currently send a response to a
2505
2085
  * "saveto" request.
2506
2086
  */
2507
- interface SavetoRequest extends FileRequest {
2087
+ export interface SavetoRequest extends FileRequest {
2508
2088
  command: CommandTypes.Saveto;
2509
2089
  arguments: SavetoRequestArgs;
2510
2090
  }
2511
2091
  /**
2512
2092
  * Arguments for navto request message.
2513
2093
  */
2514
- interface NavtoRequestArgs {
2094
+ export interface NavtoRequestArgs {
2515
2095
  /**
2516
2096
  * Search term to navigate to from current location; term can
2517
2097
  * be '.*' or an identifier prefix.
@@ -2538,14 +2118,14 @@ declare namespace ts {
2538
2118
  * match the search term given in argument 'searchTerm'. The
2539
2119
  * context for the search is given by the named file.
2540
2120
  */
2541
- interface NavtoRequest extends Request {
2121
+ export interface NavtoRequest extends Request {
2542
2122
  command: CommandTypes.Navto;
2543
2123
  arguments: NavtoRequestArgs;
2544
2124
  }
2545
2125
  /**
2546
2126
  * An item found in a navto response.
2547
2127
  */
2548
- interface NavtoItem extends FileSpan {
2128
+ export interface NavtoItem extends FileSpan {
2549
2129
  /**
2550
2130
  * The symbol's name.
2551
2131
  */
@@ -2580,13 +2160,13 @@ declare namespace ts {
2580
2160
  * Navto response message. Body is an array of navto items. Each
2581
2161
  * item gives a symbol that matched the search term.
2582
2162
  */
2583
- interface NavtoResponse extends Response {
2163
+ export interface NavtoResponse extends Response {
2584
2164
  body?: NavtoItem[];
2585
2165
  }
2586
2166
  /**
2587
2167
  * Arguments for change request message.
2588
2168
  */
2589
- interface ChangeRequestArgs extends FormatRequestArgs {
2169
+ export interface ChangeRequestArgs extends FormatRequestArgs {
2590
2170
  /**
2591
2171
  * Optional string to insert at location (file, line, offset).
2592
2172
  */
@@ -2597,14 +2177,14 @@ declare namespace ts {
2597
2177
  * Update the server's view of the file named by argument 'file'.
2598
2178
  * Server does not currently send a response to a change request.
2599
2179
  */
2600
- interface ChangeRequest extends FileLocationRequest {
2180
+ export interface ChangeRequest extends FileLocationRequest {
2601
2181
  command: CommandTypes.Change;
2602
2182
  arguments: ChangeRequestArgs;
2603
2183
  }
2604
2184
  /**
2605
2185
  * Response to "brace" request.
2606
2186
  */
2607
- interface BraceResponse extends Response {
2187
+ export interface BraceResponse extends Response {
2608
2188
  body?: TextSpan[];
2609
2189
  }
2610
2190
  /**
@@ -2612,7 +2192,7 @@ declare namespace ts {
2612
2192
  * Return response giving the file locations of matching braces
2613
2193
  * found in file at location line, offset.
2614
2194
  */
2615
- interface BraceRequest extends FileLocationRequest {
2195
+ export interface BraceRequest extends FileLocationRequest {
2616
2196
  command: CommandTypes.Brace;
2617
2197
  }
2618
2198
  /**
@@ -2620,17 +2200,17 @@ declare namespace ts {
2620
2200
  * Return response giving the list of navigation bar entries
2621
2201
  * extracted from the requested file.
2622
2202
  */
2623
- interface NavBarRequest extends FileRequest {
2203
+ export interface NavBarRequest extends FileRequest {
2624
2204
  command: CommandTypes.NavBar;
2625
2205
  }
2626
2206
  /**
2627
2207
  * NavTree request; value of command field is "navtree".
2628
2208
  * Return response giving the navigation tree of the requested file.
2629
2209
  */
2630
- interface NavTreeRequest extends FileRequest {
2210
+ export interface NavTreeRequest extends FileRequest {
2631
2211
  command: CommandTypes.NavTree;
2632
2212
  }
2633
- interface NavigationBarItem {
2213
+ export interface NavigationBarItem {
2634
2214
  /**
2635
2215
  * The item's display text.
2636
2216
  */
@@ -2657,7 +2237,7 @@ declare namespace ts {
2657
2237
  indent: number;
2658
2238
  }
2659
2239
  /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
2660
- interface NavigationTree {
2240
+ export interface NavigationTree {
2661
2241
  text: string;
2662
2242
  kind: ScriptElementKind;
2663
2243
  kindModifiers: string;
@@ -2665,29 +2245,29 @@ declare namespace ts {
2665
2245
  nameSpan: TextSpan | undefined;
2666
2246
  childItems?: NavigationTree[];
2667
2247
  }
2668
- type TelemetryEventName = "telemetry";
2669
- interface TelemetryEvent extends Event {
2248
+ export type TelemetryEventName = "telemetry";
2249
+ export interface TelemetryEvent extends Event {
2670
2250
  event: TelemetryEventName;
2671
2251
  body: TelemetryEventBody;
2672
2252
  }
2673
- interface TelemetryEventBody {
2253
+ export interface TelemetryEventBody {
2674
2254
  telemetryEventName: string;
2675
2255
  payload: any;
2676
2256
  }
2677
- type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
2678
- interface TypesInstallerInitializationFailedEvent extends Event {
2257
+ export type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
2258
+ export interface TypesInstallerInitializationFailedEvent extends Event {
2679
2259
  event: TypesInstallerInitializationFailedEventName;
2680
2260
  body: TypesInstallerInitializationFailedEventBody;
2681
2261
  }
2682
- interface TypesInstallerInitializationFailedEventBody {
2262
+ export interface TypesInstallerInitializationFailedEventBody {
2683
2263
  message: string;
2684
2264
  }
2685
- type TypingsInstalledTelemetryEventName = "typingsInstalled";
2686
- interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
2265
+ export type TypingsInstalledTelemetryEventName = "typingsInstalled";
2266
+ export interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
2687
2267
  telemetryEventName: TypingsInstalledTelemetryEventName;
2688
2268
  payload: TypingsInstalledTelemetryEventPayload;
2689
2269
  }
2690
- interface TypingsInstalledTelemetryEventPayload {
2270
+ export interface TypingsInstalledTelemetryEventPayload {
2691
2271
  /**
2692
2272
  * Comma separated list of installed typing packages
2693
2273
  */
@@ -2701,17 +2281,17 @@ declare namespace ts {
2701
2281
  */
2702
2282
  typingsInstallerVersion: string;
2703
2283
  }
2704
- type BeginInstallTypesEventName = "beginInstallTypes";
2705
- type EndInstallTypesEventName = "endInstallTypes";
2706
- interface BeginInstallTypesEvent extends Event {
2284
+ export type BeginInstallTypesEventName = "beginInstallTypes";
2285
+ export type EndInstallTypesEventName = "endInstallTypes";
2286
+ export interface BeginInstallTypesEvent extends Event {
2707
2287
  event: BeginInstallTypesEventName;
2708
2288
  body: BeginInstallTypesEventBody;
2709
2289
  }
2710
- interface EndInstallTypesEvent extends Event {
2290
+ export interface EndInstallTypesEvent extends Event {
2711
2291
  event: EndInstallTypesEventName;
2712
2292
  body: EndInstallTypesEventBody;
2713
2293
  }
2714
- interface InstallTypesEventBody {
2294
+ export interface InstallTypesEventBody {
2715
2295
  /**
2716
2296
  * correlation id to match begin and end events
2717
2297
  */
@@ -2721,384 +2301,122 @@ declare namespace ts {
2721
2301
  */
2722
2302
  packages: readonly string[];
2723
2303
  }
2724
- interface BeginInstallTypesEventBody extends InstallTypesEventBody {
2304
+ export interface BeginInstallTypesEventBody extends InstallTypesEventBody {
2725
2305
  }
2726
- interface EndInstallTypesEventBody extends InstallTypesEventBody {
2306
+ export interface EndInstallTypesEventBody extends InstallTypesEventBody {
2727
2307
  /**
2728
2308
  * true if installation succeeded, otherwise false
2729
2309
  */
2730
2310
  success: boolean;
2731
2311
  }
2732
- interface NavBarResponse extends Response {
2312
+ export interface NavBarResponse extends Response {
2733
2313
  body?: NavigationBarItem[];
2734
2314
  }
2735
- interface NavTreeResponse extends Response {
2315
+ export interface NavTreeResponse extends Response {
2736
2316
  body?: NavigationTree;
2737
2317
  }
2738
- interface CallHierarchyItem {
2739
- name: string;
2740
- kind: ScriptElementKind;
2741
- kindModifiers?: string;
2742
- file: string;
2318
+ export type CallHierarchyItem = ChangePropertyTypes<ts.CallHierarchyItem, {
2743
2319
  span: TextSpan;
2744
2320
  selectionSpan: TextSpan;
2745
- containerName?: string;
2746
- }
2747
- interface CallHierarchyIncomingCall {
2321
+ }>;
2322
+ export interface CallHierarchyIncomingCall {
2748
2323
  from: CallHierarchyItem;
2749
2324
  fromSpans: TextSpan[];
2750
2325
  }
2751
- interface CallHierarchyOutgoingCall {
2326
+ export interface CallHierarchyOutgoingCall {
2752
2327
  to: CallHierarchyItem;
2753
2328
  fromSpans: TextSpan[];
2754
2329
  }
2755
- interface PrepareCallHierarchyRequest extends FileLocationRequest {
2330
+ export interface PrepareCallHierarchyRequest extends FileLocationRequest {
2756
2331
  command: CommandTypes.PrepareCallHierarchy;
2757
2332
  }
2758
- interface PrepareCallHierarchyResponse extends Response {
2333
+ export interface PrepareCallHierarchyResponse extends Response {
2759
2334
  readonly body: CallHierarchyItem | CallHierarchyItem[];
2760
2335
  }
2761
- interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2336
+ export interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2762
2337
  command: CommandTypes.ProvideCallHierarchyIncomingCalls;
2763
2338
  }
2764
- interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2339
+ export interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2765
2340
  readonly body: CallHierarchyIncomingCall[];
2766
2341
  }
2767
- interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2342
+ export interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2768
2343
  command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
2769
2344
  }
2770
- interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2345
+ export interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2771
2346
  readonly body: CallHierarchyOutgoingCall[];
2772
2347
  }
2773
- enum IndentStyle {
2348
+ export enum IndentStyle {
2774
2349
  None = "None",
2775
2350
  Block = "Block",
2776
2351
  Smart = "Smart",
2777
2352
  }
2778
- enum SemicolonPreference {
2779
- Ignore = "ignore",
2780
- Insert = "insert",
2781
- Remove = "remove",
2782
- }
2783
- interface EditorSettings {
2784
- baseIndentSize?: number;
2785
- indentSize?: number;
2786
- tabSize?: number;
2787
- newLineCharacter?: string;
2788
- convertTabsToSpaces?: boolean;
2789
- indentStyle?: IndentStyle | ts.IndentStyle;
2790
- trimTrailingWhitespace?: boolean;
2791
- }
2792
- interface FormatCodeSettings extends EditorSettings {
2793
- insertSpaceAfterCommaDelimiter?: boolean;
2794
- insertSpaceAfterSemicolonInForStatements?: boolean;
2795
- insertSpaceBeforeAndAfterBinaryOperators?: boolean;
2796
- insertSpaceAfterConstructor?: boolean;
2797
- insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
2798
- insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
2799
- insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean;
2800
- insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
2801
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
2802
- insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
2803
- insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
2804
- insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
2805
- insertSpaceAfterTypeAssertion?: boolean;
2806
- insertSpaceBeforeFunctionParenthesis?: boolean;
2807
- placeOpenBraceOnNewLineForFunctions?: boolean;
2808
- placeOpenBraceOnNewLineForControlBlocks?: boolean;
2809
- insertSpaceBeforeTypeAnnotation?: boolean;
2810
- semicolons?: SemicolonPreference;
2811
- indentSwitchCase?: boolean;
2812
- }
2813
- interface UserPreferences {
2814
- readonly disableSuggestions?: boolean;
2815
- readonly quotePreference?: "auto" | "double" | "single";
2816
- /**
2817
- * If enabled, TypeScript will search through all external modules' exports and add them to the completions list.
2818
- * This affects lone identifier completions but not completions on the right hand side of `obj.`.
2819
- */
2820
- readonly includeCompletionsForModuleExports?: boolean;
2821
- /**
2822
- * Enables auto-import-style completions on partially-typed import statements. E.g., allows
2823
- * `import write|` to be completed to `import { writeFile } from "fs"`.
2824
- */
2825
- readonly includeCompletionsForImportStatements?: boolean;
2826
- /**
2827
- * Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`.
2828
- */
2829
- readonly includeCompletionsWithSnippetText?: boolean;
2830
- /**
2831
- * If enabled, the completion list will include completions with invalid identifier names.
2832
- * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
2833
- */
2834
- readonly includeCompletionsWithInsertText?: boolean;
2835
- /**
2836
- * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled,
2837
- * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined
2838
- * values, with insertion text to replace preceding `.` tokens with `?.`.
2839
- */
2840
- readonly includeAutomaticOptionalChainCompletions?: boolean;
2841
- /**
2842
- * If enabled, completions for class members (e.g. methods and properties) will include
2843
- * a whole declaration for the member.
2844
- * E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of
2845
- * `class A { foo }`.
2846
- */
2847
- readonly includeCompletionsWithClassMemberSnippets?: boolean;
2848
- /**
2849
- * If enabled, object literal methods will have a method declaration completion entry in addition
2850
- * to the regular completion entry containing just the method name.
2851
- * E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`,
2852
- * in addition to `const objectLiteral: T = { foo }`.
2853
- */
2854
- readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
2855
- /**
2856
- * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported.
2857
- * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property.
2858
- */
2859
- readonly useLabelDetailsInCompletionEntries?: boolean;
2860
- readonly allowIncompleteCompletions?: boolean;
2861
- readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
2862
- /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
2863
- readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
2864
- readonly allowTextChangesInNewFiles?: boolean;
2865
- readonly lazyConfiguredProjectsFromExternalProject?: boolean;
2866
- readonly providePrefixAndSuffixTextForRename?: boolean;
2867
- readonly provideRefactorNotApplicableReason?: boolean;
2868
- readonly allowRenameOfImportPath?: boolean;
2869
- readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
2870
- readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none";
2871
- readonly displayPartsForJSDoc?: boolean;
2872
- readonly generateReturnInDocTemplate?: boolean;
2873
- readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
2874
- readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
2875
- readonly includeInlayFunctionParameterTypeHints?: boolean;
2876
- readonly includeInlayVariableTypeHints?: boolean;
2877
- readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
2878
- readonly includeInlayPropertyDeclarationTypeHints?: boolean;
2879
- readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
2880
- readonly includeInlayEnumMemberValueHints?: boolean;
2881
- readonly interactiveInlayHints?: boolean;
2882
- readonly autoImportFileExcludePatterns?: string[];
2883
- /**
2884
- * Indicates whether imports should be organized in a case-insensitive manner.
2885
- */
2886
- readonly organizeImportsIgnoreCase?: "auto" | boolean;
2887
- /**
2888
- * Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value
2889
- * of their code points, or via "unicode" collation (via the
2890
- * [Unicode Collation Algorithm](https://unicode.org/reports/tr10/#Scope)) using rules associated with the locale
2891
- * specified in {@link organizeImportsCollationLocale}.
2892
- *
2893
- * Default: `"ordinal"`.
2894
- */
2895
- readonly organizeImportsCollation?: "ordinal" | "unicode";
2896
- /**
2897
- * Indicates the locale to use for "unicode" collation. If not specified, the locale `"en"` is used as an invariant
2898
- * for the sake of consistent sorting. Use `"auto"` to use the detected UI locale.
2899
- *
2900
- * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
2901
- *
2902
- * Default: `"en"`
2903
- */
2904
- readonly organizeImportsCollationLocale?: string;
2905
- /**
2906
- * Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate
2907
- * strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`.
2908
- *
2909
- * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
2910
- *
2911
- * Default: `false`
2912
- */
2913
- readonly organizeImportsNumericCollation?: boolean;
2914
- /**
2915
- * Indicates whether accents and other diacritic marks are considered unequal for the purpose of collation. When
2916
- * `true`, characters with accents and other diacritics will be collated in the order defined by the locale specified
2917
- * in {@link organizeImportsCollationLocale}.
2918
- *
2919
- * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
2920
- *
2921
- * Default: `true`
2922
- */
2923
- readonly organizeImportsAccentCollation?: boolean;
2924
- /**
2925
- * Indicates whether upper case or lower case should sort first. When `false`, the default order for the locale
2926
- * specified in {@link organizeImportsCollationLocale} is used.
2927
- *
2928
- * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. This preference is also
2929
- * ignored if we are using case-insensitive sorting, which occurs when {@link organizeImportsIgnoreCase} is `true`,
2930
- * or if {@link organizeImportsIgnoreCase} is `"auto"` and the auto-detected case sensitivity is determined to be
2931
- * case-insensitive.
2932
- *
2933
- * Default: `false`
2934
- */
2935
- readonly organizeImportsCaseFirst?: "upper" | "lower" | false;
2936
- /**
2937
- * Indicates where named type-only imports should sort. "inline" sorts named imports without regard to if the import is
2938
- * type-only.
2939
- *
2940
- * Default: `last`
2941
- */
2942
- readonly organizeImportsTypeOrder?: "last" | "first" | "inline";
2943
- /**
2944
- * Indicates whether {@link ReferencesResponseItem.lineText} is supported.
2945
- */
2946
- readonly disableLineTextInReferences?: boolean;
2947
- /**
2948
- * Indicates whether to exclude standard library and node_modules file symbols from navTo results.
2949
- */
2950
- readonly excludeLibrarySymbolsInNavTo?: boolean;
2951
- }
2952
- interface CompilerOptions {
2953
- allowJs?: boolean;
2954
- allowSyntheticDefaultImports?: boolean;
2955
- allowUnreachableCode?: boolean;
2956
- allowUnusedLabels?: boolean;
2957
- alwaysStrict?: boolean;
2958
- baseUrl?: string;
2959
- /** @deprecated */
2960
- charset?: string;
2961
- checkJs?: boolean;
2962
- declaration?: boolean;
2963
- declarationDir?: string;
2964
- disableSizeLimit?: boolean;
2965
- downlevelIteration?: boolean;
2966
- emitBOM?: boolean;
2967
- emitDecoratorMetadata?: boolean;
2968
- experimentalDecorators?: boolean;
2969
- forceConsistentCasingInFileNames?: boolean;
2970
- importHelpers?: boolean;
2971
- inlineSourceMap?: boolean;
2972
- inlineSources?: boolean;
2973
- isolatedModules?: boolean;
2974
- jsx?: JsxEmit | ts.JsxEmit;
2975
- lib?: string[];
2976
- locale?: string;
2977
- mapRoot?: string;
2978
- maxNodeModuleJsDepth?: number;
2979
- module?: ModuleKind | ts.ModuleKind;
2980
- moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
2981
- newLine?: NewLineKind | ts.NewLineKind;
2982
- noEmit?: boolean;
2983
- noEmitHelpers?: boolean;
2984
- noEmitOnError?: boolean;
2985
- noErrorTruncation?: boolean;
2986
- noFallthroughCasesInSwitch?: boolean;
2987
- noImplicitAny?: boolean;
2988
- noImplicitReturns?: boolean;
2989
- noImplicitThis?: boolean;
2990
- noUnusedLocals?: boolean;
2991
- noUnusedParameters?: boolean;
2992
- /** @deprecated */
2993
- noImplicitUseStrict?: boolean;
2994
- noLib?: boolean;
2995
- noResolve?: boolean;
2996
- /** @deprecated */
2997
- out?: string;
2998
- outDir?: string;
2999
- outFile?: string;
3000
- paths?: MapLike<string[]>;
3001
- plugins?: PluginImport[];
3002
- preserveConstEnums?: boolean;
3003
- preserveSymlinks?: boolean;
3004
- project?: string;
3005
- reactNamespace?: string;
3006
- removeComments?: boolean;
3007
- references?: ProjectReference[];
3008
- rootDir?: string;
3009
- rootDirs?: string[];
3010
- skipLibCheck?: boolean;
3011
- skipDefaultLibCheck?: boolean;
3012
- sourceMap?: boolean;
3013
- sourceRoot?: string;
3014
- strict?: boolean;
3015
- strictNullChecks?: boolean;
3016
- /** @deprecated */
3017
- suppressExcessPropertyErrors?: boolean;
3018
- /** @deprecated */
3019
- suppressImplicitAnyIndexErrors?: boolean;
3020
- useDefineForClassFields?: boolean;
3021
- target?: ScriptTarget | ts.ScriptTarget;
3022
- traceResolution?: boolean;
3023
- resolveJsonModule?: boolean;
3024
- types?: string[];
3025
- /** Paths used to used to compute primary types search locations */
3026
- typeRoots?: string[];
3027
- [option: string]: CompilerOptionsValue | undefined;
3028
- }
3029
- enum JsxEmit {
3030
- None = "None",
3031
- Preserve = "Preserve",
3032
- ReactNative = "ReactNative",
3033
- React = "React",
3034
- }
3035
- enum ModuleKind {
3036
- None = "None",
3037
- CommonJS = "CommonJS",
3038
- AMD = "AMD",
3039
- UMD = "UMD",
3040
- System = "System",
3041
- ES6 = "ES6",
3042
- ES2015 = "ES2015",
3043
- ESNext = "ESNext",
3044
- Node16 = "Node16",
3045
- NodeNext = "NodeNext",
3046
- Preserve = "Preserve",
3047
- }
3048
- enum ModuleResolutionKind {
3049
- Classic = "Classic",
2353
+ export type EditorSettings = ChangePropertyTypes<ts.EditorSettings, {
2354
+ indentStyle: IndentStyle | ts.IndentStyle;
2355
+ }>;
2356
+ export type FormatCodeSettings = ChangePropertyTypes<ts.FormatCodeSettings, {
2357
+ indentStyle: IndentStyle | ts.IndentStyle;
2358
+ }>;
2359
+ export type CompilerOptions = ChangePropertyTypes<ChangeStringIndexSignature<ts.CompilerOptions, CompilerOptionsValue>, {
2360
+ jsx: JsxEmit | ts.JsxEmit;
2361
+ module: ModuleKind | ts.ModuleKind;
2362
+ moduleResolution: ModuleResolutionKind | ts.ModuleResolutionKind;
2363
+ newLine: NewLineKind | ts.NewLineKind;
2364
+ target: ScriptTarget | ts.ScriptTarget;
2365
+ }>;
2366
+ export enum JsxEmit {
2367
+ None = "none",
2368
+ Preserve = "preserve",
2369
+ ReactNative = "react-native",
2370
+ React = "react",
2371
+ ReactJSX = "react-jsx",
2372
+ ReactJSXDev = "react-jsxdev",
2373
+ }
2374
+ export enum ModuleKind {
2375
+ None = "none",
2376
+ CommonJS = "commonjs",
2377
+ AMD = "amd",
2378
+ UMD = "umd",
2379
+ System = "system",
2380
+ ES6 = "es6",
2381
+ ES2015 = "es2015",
2382
+ ES2020 = "es2020",
2383
+ ES2022 = "es2022",
2384
+ ESNext = "esnext",
2385
+ Node16 = "node16",
2386
+ NodeNext = "nodenext",
2387
+ Preserve = "preserve",
2388
+ }
2389
+ export enum ModuleResolutionKind {
2390
+ Classic = "classic",
3050
2391
  /** @deprecated Renamed to `Node10` */
3051
- Node = "Node",
3052
- Node10 = "Node10",
3053
- Node16 = "Node16",
3054
- NodeNext = "NodeNext",
3055
- Bundler = "Bundler",
2392
+ Node = "node",
2393
+ /** @deprecated Renamed to `Node10` */
2394
+ NodeJs = "node",
2395
+ Node10 = "node10",
2396
+ Node16 = "node16",
2397
+ NodeNext = "nodenext",
2398
+ Bundler = "bundler",
3056
2399
  }
3057
- enum NewLineKind {
2400
+ export enum NewLineKind {
3058
2401
  Crlf = "Crlf",
3059
2402
  Lf = "Lf",
3060
2403
  }
3061
- enum ScriptTarget {
2404
+ export enum ScriptTarget {
3062
2405
  /** @deprecated */
3063
- ES3 = "ES3",
3064
- ES5 = "ES5",
3065
- ES6 = "ES6",
3066
- ES2015 = "ES2015",
3067
- ES2016 = "ES2016",
3068
- ES2017 = "ES2017",
3069
- ES2018 = "ES2018",
3070
- ES2019 = "ES2019",
3071
- ES2020 = "ES2020",
3072
- ES2021 = "ES2021",
3073
- ES2022 = "ES2022",
3074
- ESNext = "ESNext",
3075
- }
3076
- enum ClassificationType {
3077
- comment = 1,
3078
- identifier = 2,
3079
- keyword = 3,
3080
- numericLiteral = 4,
3081
- operator = 5,
3082
- stringLiteral = 6,
3083
- regularExpressionLiteral = 7,
3084
- whiteSpace = 8,
3085
- text = 9,
3086
- punctuation = 10,
3087
- className = 11,
3088
- enumName = 12,
3089
- interfaceName = 13,
3090
- moduleName = 14,
3091
- typeParameterName = 15,
3092
- typeAliasName = 16,
3093
- parameterName = 17,
3094
- docCommentTagName = 18,
3095
- jsxOpenTagName = 19,
3096
- jsxCloseTagName = 20,
3097
- jsxSelfClosingTagName = 21,
3098
- jsxAttribute = 22,
3099
- jsxText = 23,
3100
- jsxAttributeStringLiteralValue = 24,
3101
- bigintLiteral = 25,
2406
+ ES3 = "es3",
2407
+ ES5 = "es5",
2408
+ ES6 = "es6",
2409
+ ES2015 = "es2015",
2410
+ ES2016 = "es2016",
2411
+ ES2017 = "es2017",
2412
+ ES2018 = "es2018",
2413
+ ES2019 = "es2019",
2414
+ ES2020 = "es2020",
2415
+ ES2021 = "es2021",
2416
+ ES2022 = "es2022",
2417
+ ESNext = "esnext",
2418
+ JSON = "json",
2419
+ Latest = "esnext",
3102
2420
  }
3103
2421
  }
3104
2422
  namespace typingsInstaller {
@@ -3147,6 +2465,90 @@ declare namespace ts {
3147
2465
  protected readonly latestDistTag = "latest";
3148
2466
  }
3149
2467
  }
2468
+ type ActionSet = "action::set";
2469
+ type ActionInvalidate = "action::invalidate";
2470
+ type ActionPackageInstalled = "action::packageInstalled";
2471
+ type EventTypesRegistry = "event::typesRegistry";
2472
+ type EventBeginInstallTypes = "event::beginInstallTypes";
2473
+ type EventEndInstallTypes = "event::endInstallTypes";
2474
+ type EventInitializationFailed = "event::initializationFailed";
2475
+ type ActionWatchTypingLocations = "action::watchTypingLocations";
2476
+ interface TypingInstallerResponse {
2477
+ readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations;
2478
+ }
2479
+ interface TypingInstallerRequestWithProjectName {
2480
+ readonly projectName: string;
2481
+ }
2482
+ interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
2483
+ readonly fileNames: string[];
2484
+ readonly projectRootPath: Path;
2485
+ readonly compilerOptions: CompilerOptions;
2486
+ readonly typeAcquisition: TypeAcquisition;
2487
+ readonly unresolvedImports: SortedReadonlyArray<string>;
2488
+ readonly cachePath?: string;
2489
+ readonly kind: "discover";
2490
+ }
2491
+ interface CloseProject extends TypingInstallerRequestWithProjectName {
2492
+ readonly kind: "closeProject";
2493
+ }
2494
+ interface TypesRegistryRequest {
2495
+ readonly kind: "typesRegistry";
2496
+ }
2497
+ interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
2498
+ readonly kind: "installPackage";
2499
+ readonly fileName: Path;
2500
+ readonly packageName: string;
2501
+ readonly projectRootPath: Path;
2502
+ readonly id: number;
2503
+ }
2504
+ interface PackageInstalledResponse extends ProjectResponse {
2505
+ readonly kind: ActionPackageInstalled;
2506
+ readonly id: number;
2507
+ readonly success: boolean;
2508
+ readonly message: string;
2509
+ }
2510
+ interface InitializationFailedResponse extends TypingInstallerResponse {
2511
+ readonly kind: EventInitializationFailed;
2512
+ readonly message: string;
2513
+ readonly stack?: string;
2514
+ }
2515
+ interface ProjectResponse extends TypingInstallerResponse {
2516
+ readonly projectName: string;
2517
+ }
2518
+ interface InvalidateCachedTypings extends ProjectResponse {
2519
+ readonly kind: ActionInvalidate;
2520
+ }
2521
+ interface InstallTypes extends ProjectResponse {
2522
+ readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
2523
+ readonly eventId: number;
2524
+ readonly typingsInstallerVersion: string;
2525
+ readonly packagesToInstall: readonly string[];
2526
+ }
2527
+ interface BeginInstallTypes extends InstallTypes {
2528
+ readonly kind: EventBeginInstallTypes;
2529
+ }
2530
+ interface EndInstallTypes extends InstallTypes {
2531
+ readonly kind: EventEndInstallTypes;
2532
+ readonly installSuccess: boolean;
2533
+ }
2534
+ interface InstallTypingHost extends JsTyping.TypingResolutionHost {
2535
+ useCaseSensitiveFileNames: boolean;
2536
+ writeFile(path: string, content: string): void;
2537
+ createDirectory(path: string): void;
2538
+ getCurrentDirectory?(): string;
2539
+ }
2540
+ interface SetTypings extends ProjectResponse {
2541
+ readonly typeAcquisition: TypeAcquisition;
2542
+ readonly compilerOptions: CompilerOptions;
2543
+ readonly typings: string[];
2544
+ readonly unresolvedImports: SortedReadonlyArray<string>;
2545
+ readonly kind: ActionSet;
2546
+ }
2547
+ interface WatchTypingLocations extends ProjectResponse {
2548
+ /** if files is undefined, retain same set of watchers */
2549
+ readonly files: readonly string[] | undefined;
2550
+ readonly kind: ActionWatchTypingLocations;
2551
+ }
3150
2552
  interface CompressedData {
3151
2553
  length: number;
3152
2554
  compressionKind: string;
@@ -4145,6 +3547,14 @@ declare namespace ts {
4145
3547
  responseRequired?: boolean;
4146
3548
  }
4147
3549
  }
3550
+ namespace JsTyping {
3551
+ interface TypingResolutionHost {
3552
+ directoryExists(path: string): boolean;
3553
+ fileExists(fileName: string): boolean;
3554
+ readFile(path: string, encoding?: string): string | undefined;
3555
+ readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
3556
+ }
3557
+ }
4148
3558
  const versionMajorMinor = "5.5";
4149
3559
  /** The version of the TypeScript compiler release */
4150
3560
  const version: string;
@@ -8719,13 +8129,49 @@ declare namespace ts {
8719
8129
  interface UserPreferences {
8720
8130
  readonly disableSuggestions?: boolean;
8721
8131
  readonly quotePreference?: "auto" | "double" | "single";
8132
+ /**
8133
+ * If enabled, TypeScript will search through all external modules' exports and add them to the completions list.
8134
+ * This affects lone identifier completions but not completions on the right hand side of `obj.`.
8135
+ */
8722
8136
  readonly includeCompletionsForModuleExports?: boolean;
8137
+ /**
8138
+ * Enables auto-import-style completions on partially-typed import statements. E.g., allows
8139
+ * `import write|` to be completed to `import { writeFile } from "fs"`.
8140
+ */
8723
8141
  readonly includeCompletionsForImportStatements?: boolean;
8142
+ /**
8143
+ * Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`.
8144
+ */
8724
8145
  readonly includeCompletionsWithSnippetText?: boolean;
8146
+ /**
8147
+ * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled,
8148
+ * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined
8149
+ * values, with insertion text to replace preceding `.` tokens with `?.`.
8150
+ */
8725
8151
  readonly includeAutomaticOptionalChainCompletions?: boolean;
8152
+ /**
8153
+ * If enabled, the completion list will include completions with invalid identifier names.
8154
+ * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
8155
+ */
8726
8156
  readonly includeCompletionsWithInsertText?: boolean;
8157
+ /**
8158
+ * If enabled, completions for class members (e.g. methods and properties) will include
8159
+ * a whole declaration for the member.
8160
+ * E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of
8161
+ * `class A { foo }`.
8162
+ */
8727
8163
  readonly includeCompletionsWithClassMemberSnippets?: boolean;
8164
+ /**
8165
+ * If enabled, object literal methods will have a method declaration completion entry in addition
8166
+ * to the regular completion entry containing just the method name.
8167
+ * E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`,
8168
+ * in addition to `const objectLiteral: T = { foo }`.
8169
+ */
8728
8170
  readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
8171
+ /**
8172
+ * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported.
8173
+ * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property.
8174
+ */
8729
8175
  readonly useLabelDetailsInCompletionEntries?: boolean;
8730
8176
  readonly allowIncompleteCompletions?: boolean;
8731
8177
  readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
@@ -8748,14 +8194,74 @@ declare namespace ts {
8748
8194
  readonly allowRenameOfImportPath?: boolean;
8749
8195
  readonly autoImportFileExcludePatterns?: string[];
8750
8196
  readonly preferTypeOnlyAutoImports?: boolean;
8197
+ /**
8198
+ * Indicates whether imports should be organized in a case-insensitive manner.
8199
+ */
8751
8200
  readonly organizeImportsIgnoreCase?: "auto" | boolean;
8201
+ /**
8202
+ * Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value
8203
+ * of their code points, or via "unicode" collation (via the
8204
+ * [Unicode Collation Algorithm](https://unicode.org/reports/tr10/#Scope)) using rules associated with the locale
8205
+ * specified in {@link organizeImportsCollationLocale}.
8206
+ *
8207
+ * Default: `"ordinal"`.
8208
+ */
8752
8209
  readonly organizeImportsCollation?: "ordinal" | "unicode";
8210
+ /**
8211
+ * Indicates the locale to use for "unicode" collation. If not specified, the locale `"en"` is used as an invariant
8212
+ * for the sake of consistent sorting. Use `"auto"` to use the detected UI locale.
8213
+ *
8214
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
8215
+ *
8216
+ * Default: `"en"`
8217
+ */
8753
8218
  readonly organizeImportsLocale?: string;
8219
+ /**
8220
+ * Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate
8221
+ * strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`.
8222
+ *
8223
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
8224
+ *
8225
+ * Default: `false`
8226
+ */
8754
8227
  readonly organizeImportsNumericCollation?: boolean;
8228
+ /**
8229
+ * Indicates whether accents and other diacritic marks are considered unequal for the purpose of collation. When
8230
+ * `true`, characters with accents and other diacritics will be collated in the order defined by the locale specified
8231
+ * in {@link organizeImportsCollationLocale}.
8232
+ *
8233
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
8234
+ *
8235
+ * Default: `true`
8236
+ */
8755
8237
  readonly organizeImportsAccentCollation?: boolean;
8238
+ /**
8239
+ * Indicates whether upper case or lower case should sort first. When `false`, the default order for the locale
8240
+ * specified in {@link organizeImportsCollationLocale} is used.
8241
+ *
8242
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. This preference is also
8243
+ * ignored if we are using case-insensitive sorting, which occurs when {@link organizeImportsIgnoreCase} is `true`,
8244
+ * or if {@link organizeImportsIgnoreCase} is `"auto"` and the auto-detected case sensitivity is determined to be
8245
+ * case-insensitive.
8246
+ *
8247
+ * Default: `false`
8248
+ */
8756
8249
  readonly organizeImportsCaseFirst?: "upper" | "lower" | false;
8250
+ /**
8251
+ * Indicates where named type-only imports should sort. "inline" sorts named imports without regard to if the import is
8252
+ * type-only.
8253
+ *
8254
+ * Default: `last`
8255
+ */
8757
8256
  readonly organizeImportsTypeOrder?: "first" | "last" | "inline";
8257
+ /**
8258
+ * Indicates whether to exclude standard library and node_modules file symbols from navTo results.
8259
+ */
8758
8260
  readonly excludeLibrarySymbolsInNavTo?: boolean;
8261
+ readonly lazyConfiguredProjectsFromExternalProject?: boolean;
8262
+ readonly displayPartsForJSDoc?: boolean;
8263
+ readonly generateReturnInDocTemplate?: boolean;
8264
+ readonly disableLineTextInReferences?: boolean;
8759
8265
  }
8760
8266
  /** Represents a bigint literal value without requiring bigint support */
8761
8267
  interface PseudoBigInt {
@@ -10299,14 +9805,6 @@ declare namespace ts {
10299
9805
  emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
10300
9806
  }
10301
9807
  type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T>;
10302
- namespace JsTyping {
10303
- interface TypingResolutionHost {
10304
- directoryExists(path: string): boolean;
10305
- fileExists(fileName: string): boolean;
10306
- readFile(path: string, encoding?: string): string | undefined;
10307
- readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
10308
- }
10309
- }
10310
9808
  function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
10311
9809
  /**
10312
9810
  * Represents an immutable snapshot of a script at a specified time.Once acquired, the
@@ -11041,7 +10539,13 @@ declare namespace ts {
11041
10539
  linkText = 24,
11042
10540
  }
11043
10541
  interface SymbolDisplayPart {
10542
+ /**
10543
+ * Text of an item describing the symbol.
10544
+ */
11044
10545
  text: string;
10546
+ /**
10547
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
10548
+ */
11045
10549
  kind: string;
11046
10550
  }
11047
10551
  interface JSDocLinkDisplayPart extends SymbolDisplayPart {
@@ -11093,6 +10597,9 @@ declare namespace ts {
11093
10597
  interface InteractiveRefactorArguments {
11094
10598
  targetFile: string;
11095
10599
  }
10600
+ /**
10601
+ * Signature help information for a single parameter
10602
+ */
11096
10603
  interface SignatureHelpParameter {
11097
10604
  name: string;
11098
10605
  documentation: SymbolDisplayPart[];
@@ -11187,9 +10694,25 @@ declare namespace ts {
11187
10694
  name: string;
11188
10695
  kind: ScriptElementKind;
11189
10696
  kindModifiers?: string;
10697
+ /**
10698
+ * A string that is used for comparing completion items so that they can be ordered. This
10699
+ * is often the same as the name but may be different in certain circumstances.
10700
+ */
11190
10701
  sortText: string;
10702
+ /**
10703
+ * Text to insert instead of `name`.
10704
+ * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`,
10705
+ * coupled with `replacementSpan` to replace a dotted access with a bracket access.
10706
+ */
11191
10707
  insertText?: string;
10708
+ /**
10709
+ * A string that should be used when filtering a set of
10710
+ * completion items.
10711
+ */
11192
10712
  filterText?: string;
10713
+ /**
10714
+ * `insertText` should be interpreted as a snippet if true.
10715
+ */
11193
10716
  isSnippet?: true;
11194
10717
  /**
11195
10718
  * An optional span that indicates the text to be replaced by this completion item.
@@ -11197,13 +10720,43 @@ declare namespace ts {
11197
10720
  * It will be set if the required span differs from the one generated by the default replacement behavior.
11198
10721
  */
11199
10722
  replacementSpan?: TextSpan;
10723
+ /**
10724
+ * Indicates whether commiting this completion entry will require additional code actions to be
10725
+ * made to avoid errors. The CompletionEntryDetails will have these actions.
10726
+ */
11200
10727
  hasAction?: true;
10728
+ /**
10729
+ * Identifier (not necessarily human-readable) identifying where this completion came from.
10730
+ */
11201
10731
  source?: string;
10732
+ /**
10733
+ * Human-readable description of the `source`.
10734
+ */
11202
10735
  sourceDisplay?: SymbolDisplayPart[];
10736
+ /**
10737
+ * Additional details for the label.
10738
+ */
11203
10739
  labelDetails?: CompletionEntryLabelDetails;
10740
+ /**
10741
+ * If true, this completion should be highlighted as recommended. There will only be one of these.
10742
+ * This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class.
10743
+ * Then either that enum/class or a namespace containing it will be the recommended symbol.
10744
+ */
11204
10745
  isRecommended?: true;
10746
+ /**
10747
+ * If true, this completion was generated from traversing the name table of an unchecked JS file,
10748
+ * and therefore may not be accurate.
10749
+ */
11205
10750
  isFromUncheckedFile?: true;
10751
+ /**
10752
+ * If true, this completion was for an auto-import of a module not yet in the program, but listed
10753
+ * in the project package.json. Used for telemetry reporting.
10754
+ */
11206
10755
  isPackageJsonImport?: true;
10756
+ /**
10757
+ * If true, this completion was an auto-import-style completion of an import statement (i.e., the
10758
+ * module specifier was inserted along with the imported identifier). Used for telemetry reporting.
10759
+ */
11207
10760
  isImportStatementCompletion?: true;
11208
10761
  /**
11209
10762
  * For API purposes.
@@ -11222,7 +10775,17 @@ declare namespace ts {
11222
10775
  data?: CompletionEntryData;
11223
10776
  }
11224
10777
  interface CompletionEntryLabelDetails {
10778
+ /**
10779
+ * An optional string which is rendered less prominently directly after
10780
+ * {@link CompletionEntry.name name}, without any spacing. Should be
10781
+ * used for function signatures or type annotations.
10782
+ */
11225
10783
  detail?: string;
10784
+ /**
10785
+ * An optional string which is rendered less prominently after
10786
+ * {@link CompletionEntryLabelDetails.detail}. Should be used for fully qualified
10787
+ * names or file path.
10788
+ */
11226
10789
  description?: string;
11227
10790
  }
11228
10791
  interface CompletionEntryDetails {