@schematics/angular 18.0.3 → 18.1.0-next.1

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.
Files changed (48) hide show
  1. package/app-shell/index.js +1 -1
  2. package/application/index.js +1 -1
  3. package/class/index.js +1 -1
  4. package/component/index.js +1 -1
  5. package/config/index.js +1 -1
  6. package/directive/index.js +1 -1
  7. package/e2e/index.js +1 -1
  8. package/enum/index.js +1 -1
  9. package/environments/index.js +1 -1
  10. package/guard/index.js +1 -1
  11. package/interceptor/index.js +1 -1
  12. package/interface/index.js +1 -1
  13. package/library/index.js +1 -1
  14. package/migrations/use-application-builder/css-import-lexer.js +1 -2
  15. package/migrations/use-application-builder/migration.js +1 -1
  16. package/module/index.js +1 -1
  17. package/ng-new/index.js +1 -1
  18. package/package.json +3 -3
  19. package/pipe/index.js +1 -1
  20. package/resolver/index.js +1 -1
  21. package/server/index.js +1 -1
  22. package/service/index.js +1 -1
  23. package/service-worker/index.js +1 -1
  24. package/ssr/index.js +1 -1
  25. package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +860 -1340
  26. package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +183192 -179327
  27. package/utility/add-declaration-to-ng-module.js +1 -2
  28. package/utility/ast-utils.js +17 -18
  29. package/utility/change.js +2 -2
  30. package/utility/dependencies.js +4 -4
  31. package/utility/dependency.js +2 -2
  32. package/utility/eol.js +1 -2
  33. package/utility/find-module.js +4 -4
  34. package/utility/generate-from-files.js +1 -2
  35. package/utility/latest-versions/package.json +1 -1
  36. package/utility/latest-versions.js +2 -2
  37. package/utility/ng-ast-utils.js +3 -4
  38. package/utility/parse-name.js +1 -2
  39. package/utility/paths.js +1 -2
  40. package/utility/project-targets.js +1 -2
  41. package/utility/standalone/app_config.js +1 -2
  42. package/utility/standalone/rules.js +2 -3
  43. package/utility/standalone/util.js +6 -7
  44. package/utility/validation.js +3 -3
  45. package/utility/workspace.js +8 -8
  46. package/web-worker/index.js +1 -1
  47. package/workspace/files/tsconfig.json.template +0 -1
  48. package/workspace/index.js +1 -1
@@ -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,29 +1337,30 @@ 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
- arguments: WatchChangeRequestArgs;
1345
+ arguments: WatchChangeRequestArgs | readonly WatchChangeRequestArgs[];
1514
1346
  }
1515
- interface WatchChangeRequestArgs {
1347
+ export interface WatchChangeRequestArgs {
1516
1348
  id: number;
1517
- path: string;
1518
- eventType: "create" | "delete" | "update";
1349
+ created?: string[];
1350
+ deleted?: string[];
1351
+ updated?: string[];
1519
1352
  }
1520
1353
  /**
1521
1354
  * Request to obtain the list of files that should be regenerated if target file is recompiled.
1522
1355
  * NOTE: this us query-only operation and does not generate any output on disk.
1523
1356
  */
1524
- interface CompileOnSaveAffectedFileListRequest extends FileRequest {
1357
+ export interface CompileOnSaveAffectedFileListRequest extends FileRequest {
1525
1358
  command: CommandTypes.CompileOnSaveAffectedFileList;
1526
1359
  }
1527
1360
  /**
1528
1361
  * Contains a list of files that should be regenerated in a project
1529
1362
  */
1530
- interface CompileOnSaveAffectedFileListSingleProject {
1363
+ export interface CompileOnSaveAffectedFileListSingleProject {
1531
1364
  /**
1532
1365
  * Project name
1533
1366
  */
@@ -1544,20 +1377,20 @@ declare namespace ts {
1544
1377
  /**
1545
1378
  * Response for CompileOnSaveAffectedFileListRequest request;
1546
1379
  */
1547
- interface CompileOnSaveAffectedFileListResponse extends Response {
1380
+ export interface CompileOnSaveAffectedFileListResponse extends Response {
1548
1381
  body: CompileOnSaveAffectedFileListSingleProject[];
1549
1382
  }
1550
1383
  /**
1551
1384
  * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk.
1552
1385
  */
1553
- interface CompileOnSaveEmitFileRequest extends FileRequest {
1386
+ export interface CompileOnSaveEmitFileRequest extends FileRequest {
1554
1387
  command: CommandTypes.CompileOnSaveEmitFile;
1555
1388
  arguments: CompileOnSaveEmitFileRequestArgs;
1556
1389
  }
1557
1390
  /**
1558
1391
  * Arguments for CompileOnSaveEmitFileRequest
1559
1392
  */
1560
- interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
1393
+ export interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
1561
1394
  /**
1562
1395
  * if true - then file should be recompiled even if it does not have any changes.
1563
1396
  */
@@ -1566,10 +1399,10 @@ declare namespace ts {
1566
1399
  /** if true - return response as object with emitSkipped and diagnostics */
1567
1400
  richResponse?: boolean;
1568
1401
  }
1569
- interface CompileOnSaveEmitFileResponse extends Response {
1402
+ export interface CompileOnSaveEmitFileResponse extends Response {
1570
1403
  body: boolean | EmitResult;
1571
1404
  }
1572
- interface EmitResult {
1405
+ export interface EmitResult {
1573
1406
  emitSkipped: boolean;
1574
1407
  diagnostics: Diagnostic[] | DiagnosticWithLinePosition[];
1575
1408
  }
@@ -1579,14 +1412,14 @@ declare namespace ts {
1579
1412
  * documentation string for the symbol found in file at location
1580
1413
  * line, col.
1581
1414
  */
1582
- interface QuickInfoRequest extends FileLocationRequest {
1415
+ export interface QuickInfoRequest extends FileLocationRequest {
1583
1416
  command: CommandTypes.Quickinfo;
1584
1417
  arguments: FileLocationRequestArgs;
1585
1418
  }
1586
1419
  /**
1587
1420
  * Body of QuickInfoResponse.
1588
1421
  */
1589
- interface QuickInfoResponseBody {
1422
+ export interface QuickInfoResponseBody {
1590
1423
  /**
1591
1424
  * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
1592
1425
  */
@@ -1620,13 +1453,13 @@ declare namespace ts {
1620
1453
  /**
1621
1454
  * Quickinfo response message.
1622
1455
  */
1623
- interface QuickInfoResponse extends Response {
1456
+ export interface QuickInfoResponse extends Response {
1624
1457
  body?: QuickInfoResponseBody;
1625
1458
  }
1626
1459
  /**
1627
1460
  * Arguments for format messages.
1628
1461
  */
1629
- interface FormatRequestArgs extends FileLocationRequestArgs {
1462
+ export interface FormatRequestArgs extends FileLocationRequestArgs {
1630
1463
  /**
1631
1464
  * Last line of range for which to format text in file.
1632
1465
  */
@@ -1647,7 +1480,7 @@ declare namespace ts {
1647
1480
  * instructions in reverse to file will result in correctly
1648
1481
  * reformatted text.
1649
1482
  */
1650
- interface FormatRequest extends FileLocationRequest {
1483
+ export interface FormatRequest extends FileLocationRequest {
1651
1484
  command: CommandTypes.Format;
1652
1485
  arguments: FormatRequestArgs;
1653
1486
  }
@@ -1658,7 +1491,7 @@ declare namespace ts {
1658
1491
  * ending one character before end with newText. For an insertion,
1659
1492
  * the text span is empty. For a deletion, newText is empty.
1660
1493
  */
1661
- interface CodeEdit {
1494
+ export interface CodeEdit {
1662
1495
  /**
1663
1496
  * First character of the text span to edit.
1664
1497
  */
@@ -1673,15 +1506,15 @@ declare namespace ts {
1673
1506
  */
1674
1507
  newText: string;
1675
1508
  }
1676
- interface FileCodeEdits {
1509
+ export interface FileCodeEdits {
1677
1510
  fileName: string;
1678
1511
  textChanges: CodeEdit[];
1679
1512
  }
1680
- interface CodeFixResponse extends Response {
1513
+ export interface CodeFixResponse extends Response {
1681
1514
  /** The code actions that are available */
1682
1515
  body?: CodeFixAction[];
1683
1516
  }
1684
- interface CodeAction {
1517
+ export interface CodeAction {
1685
1518
  /** Description of the code action to display in the UI of the editor */
1686
1519
  description: string;
1687
1520
  /** Text changes to apply to each file as part of the code action */
@@ -1689,11 +1522,11 @@ declare namespace ts {
1689
1522
  /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification. */
1690
1523
  commands?: {}[];
1691
1524
  }
1692
- interface CombinedCodeActions {
1525
+ export interface CombinedCodeActions {
1693
1526
  changes: readonly FileCodeEdits[];
1694
1527
  commands?: readonly {}[];
1695
1528
  }
1696
- interface CodeFixAction extends CodeAction {
1529
+ export interface CodeFixAction extends CodeAction {
1697
1530
  /** Short name to identify the fix, for use by telemetry. */
1698
1531
  fixName: string;
1699
1532
  /**
@@ -1707,13 +1540,13 @@ declare namespace ts {
1707
1540
  /**
1708
1541
  * Format and format on key response message.
1709
1542
  */
1710
- interface FormatResponse extends Response {
1543
+ export interface FormatResponse extends Response {
1711
1544
  body?: CodeEdit[];
1712
1545
  }
1713
1546
  /**
1714
1547
  * Arguments for format on key messages.
1715
1548
  */
1716
- interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
1549
+ export interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
1717
1550
  /**
1718
1551
  * Key pressed (';', '\n', or '}').
1719
1552
  */
@@ -1728,23 +1561,14 @@ declare namespace ts {
1728
1561
  * edit instructions in reverse to file will result in correctly
1729
1562
  * reformatted text.
1730
1563
  */
1731
- interface FormatOnKeyRequest extends FileLocationRequest {
1564
+ export interface FormatOnKeyRequest extends FileLocationRequest {
1732
1565
  command: CommandTypes.Formatonkey;
1733
1566
  arguments: FormatOnKeyRequestArgs;
1734
1567
  }
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
1568
  /**
1745
1569
  * Arguments for completions messages.
1746
1570
  */
1747
- interface CompletionsRequestArgs extends FileLocationRequestArgs {
1571
+ export interface CompletionsRequestArgs extends FileLocationRequestArgs {
1748
1572
  /**
1749
1573
  * Optional prefix to apply to possible completions.
1750
1574
  */
@@ -1770,20 +1594,20 @@ declare namespace ts {
1770
1594
  * be the empty string), return the possible completions that
1771
1595
  * begin with prefix.
1772
1596
  */
1773
- interface CompletionsRequest extends FileLocationRequest {
1597
+ export interface CompletionsRequest extends FileLocationRequest {
1774
1598
  command: CommandTypes.Completions | CommandTypes.CompletionInfo;
1775
1599
  arguments: CompletionsRequestArgs;
1776
1600
  }
1777
1601
  /**
1778
1602
  * Arguments for completion details request.
1779
1603
  */
1780
- interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
1604
+ export interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
1781
1605
  /**
1782
1606
  * Names of one or more entries for which to obtain details.
1783
1607
  */
1784
1608
  entryNames: (string | CompletionEntryIdentifier)[];
1785
1609
  }
1786
- interface CompletionEntryIdentifier {
1610
+ export interface CompletionEntryIdentifier {
1787
1611
  name: string;
1788
1612
  source?: string;
1789
1613
  data?: unknown;
@@ -1794,252 +1618,50 @@ declare namespace ts {
1794
1618
  * col) and an array of completion entry names return more
1795
1619
  * detailed information for each completion entry.
1796
1620
  */
1797
- interface CompletionDetailsRequest extends FileLocationRequest {
1621
+ export interface CompletionDetailsRequest extends FileLocationRequest {
1798
1622
  command: CommandTypes.CompletionDetails;
1799
1623
  arguments: CompletionDetailsRequestArgs;
1800
1624
  }
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
1625
  /** A part of a symbol description that links from a jsdoc @link tag to a declaration */
1815
- interface JSDocLinkDisplayPart extends SymbolDisplayPart {
1626
+ export interface JSDocLinkDisplayPart extends SymbolDisplayPart {
1816
1627
  /** The location of the declaration that the @link tag links to. */
1817
1628
  target: FileSpan;
1818
1629
  }
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
- }
1630
+ export type CompletionEntry = ChangePropertyTypes<Omit<ts.CompletionEntry, "symbol">, {
1631
+ replacementSpan: TextSpan;
1632
+ data: unknown;
1633
+ }>;
1920
1634
  /**
1921
1635
  * Additional completion entry details, available on demand
1922
1636
  */
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
- }
1637
+ export type CompletionEntryDetails = ChangePropertyTypes<ts.CompletionEntryDetails, {
1638
+ tags: JSDocTagInfo[];
1639
+ codeActions: CodeAction[];
1640
+ }>;
1961
1641
  /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */
1962
- interface CompletionsResponse extends Response {
1642
+ export interface CompletionsResponse extends Response {
1963
1643
  body?: CompletionEntry[];
1964
1644
  }
1965
- interface CompletionInfoResponse extends Response {
1645
+ export interface CompletionInfoResponse extends Response {
1966
1646
  body?: CompletionInfo;
1967
1647
  }
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 {
1648
+ export type CompletionInfo = ChangePropertyTypes<ts.CompletionInfo, {
1649
+ entries: readonly CompletionEntry[];
1650
+ optionalReplacementSpan: TextSpan;
1651
+ }>;
1652
+ export interface CompletionDetailsResponse extends Response {
1983
1653
  body?: CompletionEntryDetails[];
1984
1654
  }
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
1655
  /**
2007
1656
  * Represents a single signature to show in signature help.
2008
1657
  */
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
- */
1658
+ export type SignatureHelpItem = ChangePropertyTypes<ts.SignatureHelpItem, {
2037
1659
  tags: JSDocTagInfo[];
2038
- }
1660
+ }>;
2039
1661
  /**
2040
1662
  * Signature help items found in the response of a signature help request.
2041
1663
  */
2042
- interface SignatureHelpItems {
1664
+ export interface SignatureHelpItems {
2043
1665
  /**
2044
1666
  * The signature help items.
2045
1667
  */
@@ -2061,68 +1683,32 @@ declare namespace ts {
2061
1683
  */
2062
1684
  argumentCount: number;
2063
1685
  }
2064
- type SignatureHelpTriggerCharacter = "," | "(" | "<";
2065
- type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
2066
1686
  /**
2067
1687
  * Arguments of a signature help request.
2068
1688
  */
2069
- interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
1689
+ export interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
2070
1690
  /**
2071
1691
  * Reason why signature help was invoked.
2072
1692
  * See each individual possible
2073
1693
  */
2074
1694
  triggerReason?: SignatureHelpTriggerReason;
2075
1695
  }
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
1696
  /**
2110
1697
  * Signature help request; value of command field is "signatureHelp".
2111
1698
  * Given a file location (file, line, col), return the signature
2112
1699
  * help.
2113
1700
  */
2114
- interface SignatureHelpRequest extends FileLocationRequest {
1701
+ export interface SignatureHelpRequest extends FileLocationRequest {
2115
1702
  command: CommandTypes.SignatureHelp;
2116
1703
  arguments: SignatureHelpRequestArgs;
2117
1704
  }
2118
1705
  /**
2119
1706
  * Response object for a SignatureHelpRequest.
2120
1707
  */
2121
- interface SignatureHelpResponse extends Response {
1708
+ export interface SignatureHelpResponse extends Response {
2122
1709
  body?: SignatureHelpItems;
2123
1710
  }
2124
- type InlayHintKind = "Type" | "Parameter" | "Enum";
2125
- interface InlayHintsRequestArgs extends FileRequestArgs {
1711
+ export interface InlayHintsRequestArgs extends FileRequestArgs {
2126
1712
  /**
2127
1713
  * Start position of the span.
2128
1714
  */
@@ -2132,68 +1718,63 @@ declare namespace ts {
2132
1718
  */
2133
1719
  length: number;
2134
1720
  }
2135
- interface InlayHintsRequest extends Request {
1721
+ export interface InlayHintsRequest extends Request {
2136
1722
  command: CommandTypes.ProvideInlayHints;
2137
1723
  arguments: InlayHintsRequestArgs;
2138
1724
  }
2139
- interface InlayHintItem {
2140
- /** This property will be the empty string when displayParts is set. */
2141
- text: string;
1725
+ export type InlayHintItem = ChangePropertyTypes<ts.InlayHint, {
2142
1726
  position: Location;
2143
- kind: InlayHintKind;
2144
- whitespaceBefore?: boolean;
2145
- whitespaceAfter?: boolean;
2146
- displayParts?: InlayHintItemDisplayPart[];
2147
- }
2148
- interface InlayHintItemDisplayPart {
1727
+ displayParts: InlayHintItemDisplayPart[];
1728
+ }>;
1729
+ export interface InlayHintItemDisplayPart {
2149
1730
  text: string;
2150
1731
  span?: FileSpan;
2151
1732
  }
2152
- interface InlayHintsResponse extends Response {
1733
+ export interface InlayHintsResponse extends Response {
2153
1734
  body?: InlayHintItem[];
2154
1735
  }
2155
1736
  /**
2156
1737
  * Synchronous request for semantic diagnostics of one file.
2157
1738
  */
2158
- interface SemanticDiagnosticsSyncRequest extends FileRequest {
1739
+ export interface SemanticDiagnosticsSyncRequest extends FileRequest {
2159
1740
  command: CommandTypes.SemanticDiagnosticsSync;
2160
1741
  arguments: SemanticDiagnosticsSyncRequestArgs;
2161
1742
  }
2162
- interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1743
+ export interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
2163
1744
  includeLinePosition?: boolean;
2164
1745
  }
2165
1746
  /**
2166
1747
  * Response object for synchronous sematic diagnostics request.
2167
1748
  */
2168
- interface SemanticDiagnosticsSyncResponse extends Response {
1749
+ export interface SemanticDiagnosticsSyncResponse extends Response {
2169
1750
  body?: Diagnostic[] | DiagnosticWithLinePosition[];
2170
1751
  }
2171
- interface SuggestionDiagnosticsSyncRequest extends FileRequest {
1752
+ export interface SuggestionDiagnosticsSyncRequest extends FileRequest {
2172
1753
  command: CommandTypes.SuggestionDiagnosticsSync;
2173
1754
  arguments: SuggestionDiagnosticsSyncRequestArgs;
2174
1755
  }
2175
- type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs;
2176
- type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse;
1756
+ export type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs;
1757
+ export type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse;
2177
1758
  /**
2178
1759
  * Synchronous request for syntactic diagnostics of one file.
2179
1760
  */
2180
- interface SyntacticDiagnosticsSyncRequest extends FileRequest {
1761
+ export interface SyntacticDiagnosticsSyncRequest extends FileRequest {
2181
1762
  command: CommandTypes.SyntacticDiagnosticsSync;
2182
1763
  arguments: SyntacticDiagnosticsSyncRequestArgs;
2183
1764
  }
2184
- interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1765
+ export interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
2185
1766
  includeLinePosition?: boolean;
2186
1767
  }
2187
1768
  /**
2188
1769
  * Response object for synchronous syntactic diagnostics request.
2189
1770
  */
2190
- interface SyntacticDiagnosticsSyncResponse extends Response {
1771
+ export interface SyntacticDiagnosticsSyncResponse extends Response {
2191
1772
  body?: Diagnostic[] | DiagnosticWithLinePosition[];
2192
1773
  }
2193
1774
  /**
2194
1775
  * Arguments for GeterrForProject request.
2195
1776
  */
2196
- interface GeterrForProjectRequestArgs {
1777
+ export interface GeterrForProjectRequestArgs {
2197
1778
  /**
2198
1779
  * the file requesting project error list
2199
1780
  */
@@ -2209,14 +1790,14 @@ declare namespace ts {
2209
1790
  * "geterrForProject". It works similarly with 'Geterr', only
2210
1791
  * it request for every file in this project.
2211
1792
  */
2212
- interface GeterrForProjectRequest extends Request {
1793
+ export interface GeterrForProjectRequest extends Request {
2213
1794
  command: CommandTypes.GeterrForProject;
2214
1795
  arguments: GeterrForProjectRequestArgs;
2215
1796
  }
2216
1797
  /**
2217
1798
  * Arguments for geterr messages.
2218
1799
  */
2219
- interface GeterrRequestArgs {
1800
+ export interface GeterrRequestArgs {
2220
1801
  /**
2221
1802
  * List of file names for which to compute compiler errors.
2222
1803
  * The files will be checked in list order.
@@ -2238,25 +1819,25 @@ declare namespace ts {
2238
1819
  * practice for an editor is to send a file list containing each
2239
1820
  * file that is currently visible, in most-recently-used order.
2240
1821
  */
2241
- interface GeterrRequest extends Request {
1822
+ export interface GeterrRequest extends Request {
2242
1823
  command: CommandTypes.Geterr;
2243
1824
  arguments: GeterrRequestArgs;
2244
1825
  }
2245
- type RequestCompletedEventName = "requestCompleted";
1826
+ export type RequestCompletedEventName = "requestCompleted";
2246
1827
  /**
2247
1828
  * Event that is sent when server have finished processing request with specified id.
2248
1829
  */
2249
- interface RequestCompletedEvent extends Event {
1830
+ export interface RequestCompletedEvent extends Event {
2250
1831
  event: RequestCompletedEventName;
2251
1832
  body: RequestCompletedEventBody;
2252
1833
  }
2253
- interface RequestCompletedEventBody {
1834
+ export interface RequestCompletedEventBody {
2254
1835
  request_seq: number;
2255
1836
  }
2256
1837
  /**
2257
1838
  * Item of diagnostic information found in a DiagnosticEvent message.
2258
1839
  */
2259
- interface Diagnostic {
1840
+ export interface Diagnostic {
2260
1841
  /**
2261
1842
  * Starting file location at which text applies.
2262
1843
  */
@@ -2288,7 +1869,7 @@ declare namespace ts {
2288
1869
  */
2289
1870
  source?: string;
2290
1871
  }
2291
- interface DiagnosticWithFileName extends Diagnostic {
1872
+ export interface DiagnosticWithFileName extends Diagnostic {
2292
1873
  /**
2293
1874
  * Name of the file the diagnostic is in
2294
1875
  */
@@ -2297,7 +1878,7 @@ declare namespace ts {
2297
1878
  /**
2298
1879
  * Represents additional spans returned with a diagnostic which are relevant to it
2299
1880
  */
2300
- interface DiagnosticRelatedInformation {
1881
+ export interface DiagnosticRelatedInformation {
2301
1882
  /**
2302
1883
  * The category of the related information message, e.g. "error", "warning", or "suggestion".
2303
1884
  */
@@ -2315,7 +1896,7 @@ declare namespace ts {
2315
1896
  */
2316
1897
  span?: FileSpan;
2317
1898
  }
2318
- interface DiagnosticEventBody {
1899
+ export interface DiagnosticEventBody {
2319
1900
  /**
2320
1901
  * The file for which diagnostic information is reported.
2321
1902
  */
@@ -2325,16 +1906,16 @@ declare namespace ts {
2325
1906
  */
2326
1907
  diagnostics: Diagnostic[];
2327
1908
  }
2328
- type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag";
1909
+ export type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag";
2329
1910
  /**
2330
1911
  * Event message for DiagnosticEventKind event types.
2331
1912
  * These events provide syntactic and semantic errors for a file.
2332
1913
  */
2333
- interface DiagnosticEvent extends Event {
1914
+ export interface DiagnosticEvent extends Event {
2334
1915
  body?: DiagnosticEventBody;
2335
1916
  event: DiagnosticEventKind;
2336
1917
  }
2337
- interface ConfigFileDiagnosticEventBody {
1918
+ export interface ConfigFileDiagnosticEventBody {
2338
1919
  /**
2339
1920
  * The file which trigged the searching and error-checking of the config file
2340
1921
  */
@@ -2352,16 +1933,16 @@ declare namespace ts {
2352
1933
  * Event message for "configFileDiag" event type.
2353
1934
  * This event provides errors for a found config file.
2354
1935
  */
2355
- interface ConfigFileDiagnosticEvent extends Event {
1936
+ export interface ConfigFileDiagnosticEvent extends Event {
2356
1937
  body?: ConfigFileDiagnosticEventBody;
2357
1938
  event: "configFileDiag";
2358
1939
  }
2359
- type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
2360
- interface ProjectLanguageServiceStateEvent extends Event {
1940
+ export type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
1941
+ export interface ProjectLanguageServiceStateEvent extends Event {
2361
1942
  event: ProjectLanguageServiceStateEventName;
2362
1943
  body?: ProjectLanguageServiceStateEventBody;
2363
1944
  }
2364
- interface ProjectLanguageServiceStateEventBody {
1945
+ export interface ProjectLanguageServiceStateEventBody {
2365
1946
  /**
2366
1947
  * Project name that has changes in the state of language service.
2367
1948
  * For configured projects this will be the config file path.
@@ -2375,52 +1956,52 @@ declare namespace ts {
2375
1956
  */
2376
1957
  languageServiceEnabled: boolean;
2377
1958
  }
2378
- type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground";
2379
- interface ProjectsUpdatedInBackgroundEvent extends Event {
1959
+ export type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground";
1960
+ export interface ProjectsUpdatedInBackgroundEvent extends Event {
2380
1961
  event: ProjectsUpdatedInBackgroundEventName;
2381
1962
  body: ProjectsUpdatedInBackgroundEventBody;
2382
1963
  }
2383
- interface ProjectsUpdatedInBackgroundEventBody {
1964
+ export interface ProjectsUpdatedInBackgroundEventBody {
2384
1965
  /**
2385
1966
  * Current set of open files
2386
1967
  */
2387
1968
  openFiles: string[];
2388
1969
  }
2389
- type ProjectLoadingStartEventName = "projectLoadingStart";
2390
- interface ProjectLoadingStartEvent extends Event {
1970
+ export type ProjectLoadingStartEventName = "projectLoadingStart";
1971
+ export interface ProjectLoadingStartEvent extends Event {
2391
1972
  event: ProjectLoadingStartEventName;
2392
1973
  body: ProjectLoadingStartEventBody;
2393
1974
  }
2394
- interface ProjectLoadingStartEventBody {
1975
+ export interface ProjectLoadingStartEventBody {
2395
1976
  /** name of the project */
2396
1977
  projectName: string;
2397
1978
  /** reason for loading */
2398
1979
  reason: string;
2399
1980
  }
2400
- type ProjectLoadingFinishEventName = "projectLoadingFinish";
2401
- interface ProjectLoadingFinishEvent extends Event {
1981
+ export type ProjectLoadingFinishEventName = "projectLoadingFinish";
1982
+ export interface ProjectLoadingFinishEvent extends Event {
2402
1983
  event: ProjectLoadingFinishEventName;
2403
1984
  body: ProjectLoadingFinishEventBody;
2404
1985
  }
2405
- interface ProjectLoadingFinishEventBody {
1986
+ export interface ProjectLoadingFinishEventBody {
2406
1987
  /** name of the project */
2407
1988
  projectName: string;
2408
1989
  }
2409
- type SurveyReadyEventName = "surveyReady";
2410
- interface SurveyReadyEvent extends Event {
1990
+ export type SurveyReadyEventName = "surveyReady";
1991
+ export interface SurveyReadyEvent extends Event {
2411
1992
  event: SurveyReadyEventName;
2412
1993
  body: SurveyReadyEventBody;
2413
1994
  }
2414
- interface SurveyReadyEventBody {
1995
+ export interface SurveyReadyEventBody {
2415
1996
  /** Name of the survey. This is an internal machine- and programmer-friendly name */
2416
1997
  surveyId: string;
2417
1998
  }
2418
- type LargeFileReferencedEventName = "largeFileReferenced";
2419
- interface LargeFileReferencedEvent extends Event {
1999
+ export type LargeFileReferencedEventName = "largeFileReferenced";
2000
+ export interface LargeFileReferencedEvent extends Event {
2420
2001
  event: LargeFileReferencedEventName;
2421
2002
  body: LargeFileReferencedEventBody;
2422
2003
  }
2423
- interface LargeFileReferencedEventBody {
2004
+ export interface LargeFileReferencedEventBody {
2424
2005
  /**
2425
2006
  * name of the large file being loaded
2426
2007
  */
@@ -2434,37 +2015,38 @@ declare namespace ts {
2434
2015
  */
2435
2016
  maxFileSize: number;
2436
2017
  }
2437
- type CreateFileWatcherEventName = "createFileWatcher";
2438
- interface CreateFileWatcherEvent extends Event {
2018
+ export type CreateFileWatcherEventName = "createFileWatcher";
2019
+ export interface CreateFileWatcherEvent extends Event {
2439
2020
  readonly event: CreateFileWatcherEventName;
2440
2021
  readonly body: CreateFileWatcherEventBody;
2441
2022
  }
2442
- interface CreateFileWatcherEventBody {
2023
+ export interface CreateFileWatcherEventBody {
2443
2024
  readonly id: number;
2444
2025
  readonly path: string;
2445
2026
  }
2446
- type CreateDirectoryWatcherEventName = "createDirectoryWatcher";
2447
- interface CreateDirectoryWatcherEvent extends Event {
2027
+ export type CreateDirectoryWatcherEventName = "createDirectoryWatcher";
2028
+ export interface CreateDirectoryWatcherEvent extends Event {
2448
2029
  readonly event: CreateDirectoryWatcherEventName;
2449
2030
  readonly body: CreateDirectoryWatcherEventBody;
2450
2031
  }
2451
- interface CreateDirectoryWatcherEventBody {
2032
+ export interface CreateDirectoryWatcherEventBody {
2452
2033
  readonly id: number;
2453
2034
  readonly path: string;
2454
2035
  readonly recursive: boolean;
2036
+ readonly ignoreUpdate?: boolean;
2455
2037
  }
2456
- type CloseFileWatcherEventName = "closeFileWatcher";
2457
- interface CloseFileWatcherEvent extends Event {
2038
+ export type CloseFileWatcherEventName = "closeFileWatcher";
2039
+ export interface CloseFileWatcherEvent extends Event {
2458
2040
  readonly event: CloseFileWatcherEventName;
2459
2041
  readonly body: CloseFileWatcherEventBody;
2460
2042
  }
2461
- interface CloseFileWatcherEventBody {
2043
+ export interface CloseFileWatcherEventBody {
2462
2044
  readonly id: number;
2463
2045
  }
2464
2046
  /**
2465
2047
  * Arguments for reload request.
2466
2048
  */
2467
- interface ReloadRequestArgs extends FileRequestArgs {
2049
+ export interface ReloadRequestArgs extends FileRequestArgs {
2468
2050
  /**
2469
2051
  * Name of temporary file from which to reload file
2470
2052
  * contents. May be same as file.
@@ -2477,7 +2059,7 @@ declare namespace ts {
2477
2059
  * from temporary file with name given by the 'tmpfile' argument.
2478
2060
  * The two names can be identical.
2479
2061
  */
2480
- interface ReloadRequest extends FileRequest {
2062
+ export interface ReloadRequest extends FileRequest {
2481
2063
  command: CommandTypes.Reload;
2482
2064
  arguments: ReloadRequestArgs;
2483
2065
  }
@@ -2485,12 +2067,12 @@ declare namespace ts {
2485
2067
  * Response to "reload" request. This is just an acknowledgement, so
2486
2068
  * no body field is required.
2487
2069
  */
2488
- interface ReloadResponse extends Response {
2070
+ export interface ReloadResponse extends Response {
2489
2071
  }
2490
2072
  /**
2491
2073
  * Arguments for saveto request.
2492
2074
  */
2493
- interface SavetoRequestArgs extends FileRequestArgs {
2075
+ export interface SavetoRequestArgs extends FileRequestArgs {
2494
2076
  /**
2495
2077
  * Name of temporary file into which to save server's view of
2496
2078
  * file contents.
@@ -2504,14 +2086,14 @@ declare namespace ts {
2504
2086
  * 'file'. The server does not currently send a response to a
2505
2087
  * "saveto" request.
2506
2088
  */
2507
- interface SavetoRequest extends FileRequest {
2089
+ export interface SavetoRequest extends FileRequest {
2508
2090
  command: CommandTypes.Saveto;
2509
2091
  arguments: SavetoRequestArgs;
2510
2092
  }
2511
2093
  /**
2512
2094
  * Arguments for navto request message.
2513
2095
  */
2514
- interface NavtoRequestArgs {
2096
+ export interface NavtoRequestArgs {
2515
2097
  /**
2516
2098
  * Search term to navigate to from current location; term can
2517
2099
  * be '.*' or an identifier prefix.
@@ -2538,14 +2120,14 @@ declare namespace ts {
2538
2120
  * match the search term given in argument 'searchTerm'. The
2539
2121
  * context for the search is given by the named file.
2540
2122
  */
2541
- interface NavtoRequest extends Request {
2123
+ export interface NavtoRequest extends Request {
2542
2124
  command: CommandTypes.Navto;
2543
2125
  arguments: NavtoRequestArgs;
2544
2126
  }
2545
2127
  /**
2546
2128
  * An item found in a navto response.
2547
2129
  */
2548
- interface NavtoItem extends FileSpan {
2130
+ export interface NavtoItem extends FileSpan {
2549
2131
  /**
2550
2132
  * The symbol's name.
2551
2133
  */
@@ -2580,13 +2162,13 @@ declare namespace ts {
2580
2162
  * Navto response message. Body is an array of navto items. Each
2581
2163
  * item gives a symbol that matched the search term.
2582
2164
  */
2583
- interface NavtoResponse extends Response {
2165
+ export interface NavtoResponse extends Response {
2584
2166
  body?: NavtoItem[];
2585
2167
  }
2586
2168
  /**
2587
2169
  * Arguments for change request message.
2588
2170
  */
2589
- interface ChangeRequestArgs extends FormatRequestArgs {
2171
+ export interface ChangeRequestArgs extends FormatRequestArgs {
2590
2172
  /**
2591
2173
  * Optional string to insert at location (file, line, offset).
2592
2174
  */
@@ -2597,14 +2179,14 @@ declare namespace ts {
2597
2179
  * Update the server's view of the file named by argument 'file'.
2598
2180
  * Server does not currently send a response to a change request.
2599
2181
  */
2600
- interface ChangeRequest extends FileLocationRequest {
2182
+ export interface ChangeRequest extends FileLocationRequest {
2601
2183
  command: CommandTypes.Change;
2602
2184
  arguments: ChangeRequestArgs;
2603
2185
  }
2604
2186
  /**
2605
2187
  * Response to "brace" request.
2606
2188
  */
2607
- interface BraceResponse extends Response {
2189
+ export interface BraceResponse extends Response {
2608
2190
  body?: TextSpan[];
2609
2191
  }
2610
2192
  /**
@@ -2612,7 +2194,7 @@ declare namespace ts {
2612
2194
  * Return response giving the file locations of matching braces
2613
2195
  * found in file at location line, offset.
2614
2196
  */
2615
- interface BraceRequest extends FileLocationRequest {
2197
+ export interface BraceRequest extends FileLocationRequest {
2616
2198
  command: CommandTypes.Brace;
2617
2199
  }
2618
2200
  /**
@@ -2620,17 +2202,17 @@ declare namespace ts {
2620
2202
  * Return response giving the list of navigation bar entries
2621
2203
  * extracted from the requested file.
2622
2204
  */
2623
- interface NavBarRequest extends FileRequest {
2205
+ export interface NavBarRequest extends FileRequest {
2624
2206
  command: CommandTypes.NavBar;
2625
2207
  }
2626
2208
  /**
2627
2209
  * NavTree request; value of command field is "navtree".
2628
2210
  * Return response giving the navigation tree of the requested file.
2629
2211
  */
2630
- interface NavTreeRequest extends FileRequest {
2212
+ export interface NavTreeRequest extends FileRequest {
2631
2213
  command: CommandTypes.NavTree;
2632
2214
  }
2633
- interface NavigationBarItem {
2215
+ export interface NavigationBarItem {
2634
2216
  /**
2635
2217
  * The item's display text.
2636
2218
  */
@@ -2657,7 +2239,7 @@ declare namespace ts {
2657
2239
  indent: number;
2658
2240
  }
2659
2241
  /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
2660
- interface NavigationTree {
2242
+ export interface NavigationTree {
2661
2243
  text: string;
2662
2244
  kind: ScriptElementKind;
2663
2245
  kindModifiers: string;
@@ -2665,29 +2247,29 @@ declare namespace ts {
2665
2247
  nameSpan: TextSpan | undefined;
2666
2248
  childItems?: NavigationTree[];
2667
2249
  }
2668
- type TelemetryEventName = "telemetry";
2669
- interface TelemetryEvent extends Event {
2250
+ export type TelemetryEventName = "telemetry";
2251
+ export interface TelemetryEvent extends Event {
2670
2252
  event: TelemetryEventName;
2671
2253
  body: TelemetryEventBody;
2672
2254
  }
2673
- interface TelemetryEventBody {
2255
+ export interface TelemetryEventBody {
2674
2256
  telemetryEventName: string;
2675
2257
  payload: any;
2676
2258
  }
2677
- type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
2678
- interface TypesInstallerInitializationFailedEvent extends Event {
2259
+ export type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
2260
+ export interface TypesInstallerInitializationFailedEvent extends Event {
2679
2261
  event: TypesInstallerInitializationFailedEventName;
2680
2262
  body: TypesInstallerInitializationFailedEventBody;
2681
2263
  }
2682
- interface TypesInstallerInitializationFailedEventBody {
2264
+ export interface TypesInstallerInitializationFailedEventBody {
2683
2265
  message: string;
2684
2266
  }
2685
- type TypingsInstalledTelemetryEventName = "typingsInstalled";
2686
- interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
2267
+ export type TypingsInstalledTelemetryEventName = "typingsInstalled";
2268
+ export interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
2687
2269
  telemetryEventName: TypingsInstalledTelemetryEventName;
2688
2270
  payload: TypingsInstalledTelemetryEventPayload;
2689
2271
  }
2690
- interface TypingsInstalledTelemetryEventPayload {
2272
+ export interface TypingsInstalledTelemetryEventPayload {
2691
2273
  /**
2692
2274
  * Comma separated list of installed typing packages
2693
2275
  */
@@ -2701,17 +2283,17 @@ declare namespace ts {
2701
2283
  */
2702
2284
  typingsInstallerVersion: string;
2703
2285
  }
2704
- type BeginInstallTypesEventName = "beginInstallTypes";
2705
- type EndInstallTypesEventName = "endInstallTypes";
2706
- interface BeginInstallTypesEvent extends Event {
2286
+ export type BeginInstallTypesEventName = "beginInstallTypes";
2287
+ export type EndInstallTypesEventName = "endInstallTypes";
2288
+ export interface BeginInstallTypesEvent extends Event {
2707
2289
  event: BeginInstallTypesEventName;
2708
2290
  body: BeginInstallTypesEventBody;
2709
2291
  }
2710
- interface EndInstallTypesEvent extends Event {
2292
+ export interface EndInstallTypesEvent extends Event {
2711
2293
  event: EndInstallTypesEventName;
2712
2294
  body: EndInstallTypesEventBody;
2713
2295
  }
2714
- interface InstallTypesEventBody {
2296
+ export interface InstallTypesEventBody {
2715
2297
  /**
2716
2298
  * correlation id to match begin and end events
2717
2299
  */
@@ -2721,378 +2303,123 @@ declare namespace ts {
2721
2303
  */
2722
2304
  packages: readonly string[];
2723
2305
  }
2724
- interface BeginInstallTypesEventBody extends InstallTypesEventBody {
2306
+ export interface BeginInstallTypesEventBody extends InstallTypesEventBody {
2725
2307
  }
2726
- interface EndInstallTypesEventBody extends InstallTypesEventBody {
2308
+ export interface EndInstallTypesEventBody extends InstallTypesEventBody {
2727
2309
  /**
2728
2310
  * true if installation succeeded, otherwise false
2729
2311
  */
2730
2312
  success: boolean;
2731
2313
  }
2732
- interface NavBarResponse extends Response {
2314
+ export interface NavBarResponse extends Response {
2733
2315
  body?: NavigationBarItem[];
2734
2316
  }
2735
- interface NavTreeResponse extends Response {
2317
+ export interface NavTreeResponse extends Response {
2736
2318
  body?: NavigationTree;
2737
2319
  }
2738
- interface CallHierarchyItem {
2739
- name: string;
2740
- kind: ScriptElementKind;
2741
- kindModifiers?: string;
2742
- file: string;
2320
+ export type CallHierarchyItem = ChangePropertyTypes<ts.CallHierarchyItem, {
2743
2321
  span: TextSpan;
2744
2322
  selectionSpan: TextSpan;
2745
- containerName?: string;
2746
- }
2747
- interface CallHierarchyIncomingCall {
2323
+ }>;
2324
+ export interface CallHierarchyIncomingCall {
2748
2325
  from: CallHierarchyItem;
2749
2326
  fromSpans: TextSpan[];
2750
2327
  }
2751
- interface CallHierarchyOutgoingCall {
2328
+ export interface CallHierarchyOutgoingCall {
2752
2329
  to: CallHierarchyItem;
2753
2330
  fromSpans: TextSpan[];
2754
2331
  }
2755
- interface PrepareCallHierarchyRequest extends FileLocationRequest {
2332
+ export interface PrepareCallHierarchyRequest extends FileLocationRequest {
2756
2333
  command: CommandTypes.PrepareCallHierarchy;
2757
2334
  }
2758
- interface PrepareCallHierarchyResponse extends Response {
2335
+ export interface PrepareCallHierarchyResponse extends Response {
2759
2336
  readonly body: CallHierarchyItem | CallHierarchyItem[];
2760
2337
  }
2761
- interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2338
+ export interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2762
2339
  command: CommandTypes.ProvideCallHierarchyIncomingCalls;
2763
2340
  }
2764
- interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2341
+ export interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2765
2342
  readonly body: CallHierarchyIncomingCall[];
2766
2343
  }
2767
- interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2344
+ export interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2768
2345
  command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
2769
2346
  }
2770
- interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2347
+ export interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2771
2348
  readonly body: CallHierarchyOutgoingCall[];
2772
2349
  }
2773
- enum IndentStyle {
2350
+ export enum IndentStyle {
2774
2351
  None = "None",
2775
2352
  Block = "Block",
2776
2353
  Smart = "Smart",
2777
2354
  }
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
- charset?: string;
2960
- checkJs?: boolean;
2961
- declaration?: boolean;
2962
- declarationDir?: string;
2963
- disableSizeLimit?: boolean;
2964
- downlevelIteration?: boolean;
2965
- emitBOM?: boolean;
2966
- emitDecoratorMetadata?: boolean;
2967
- experimentalDecorators?: boolean;
2968
- forceConsistentCasingInFileNames?: boolean;
2969
- importHelpers?: boolean;
2970
- inlineSourceMap?: boolean;
2971
- inlineSources?: boolean;
2972
- isolatedModules?: boolean;
2973
- jsx?: JsxEmit | ts.JsxEmit;
2974
- lib?: string[];
2975
- locale?: string;
2976
- mapRoot?: string;
2977
- maxNodeModuleJsDepth?: number;
2978
- module?: ModuleKind | ts.ModuleKind;
2979
- moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
2980
- newLine?: NewLineKind | ts.NewLineKind;
2981
- noEmit?: boolean;
2982
- noEmitHelpers?: boolean;
2983
- noEmitOnError?: boolean;
2984
- noErrorTruncation?: boolean;
2985
- noFallthroughCasesInSwitch?: boolean;
2986
- noImplicitAny?: boolean;
2987
- noImplicitReturns?: boolean;
2988
- noImplicitThis?: boolean;
2989
- noUnusedLocals?: boolean;
2990
- noUnusedParameters?: boolean;
2991
- noImplicitUseStrict?: boolean;
2992
- noLib?: boolean;
2993
- noResolve?: boolean;
2994
- out?: string;
2995
- outDir?: string;
2996
- outFile?: string;
2997
- paths?: MapLike<string[]>;
2998
- plugins?: PluginImport[];
2999
- preserveConstEnums?: boolean;
3000
- preserveSymlinks?: boolean;
3001
- project?: string;
3002
- reactNamespace?: string;
3003
- removeComments?: boolean;
3004
- references?: ProjectReference[];
3005
- rootDir?: string;
3006
- rootDirs?: string[];
3007
- skipLibCheck?: boolean;
3008
- skipDefaultLibCheck?: boolean;
3009
- sourceMap?: boolean;
3010
- sourceRoot?: string;
3011
- strict?: boolean;
3012
- strictNullChecks?: boolean;
3013
- suppressExcessPropertyErrors?: boolean;
3014
- suppressImplicitAnyIndexErrors?: boolean;
3015
- useDefineForClassFields?: boolean;
3016
- target?: ScriptTarget | ts.ScriptTarget;
3017
- traceResolution?: boolean;
3018
- resolveJsonModule?: boolean;
3019
- types?: string[];
3020
- /** Paths used to used to compute primary types search locations */
3021
- typeRoots?: string[];
3022
- [option: string]: CompilerOptionsValue | undefined;
3023
- }
3024
- enum JsxEmit {
3025
- None = "None",
3026
- Preserve = "Preserve",
3027
- ReactNative = "ReactNative",
3028
- React = "React",
3029
- }
3030
- enum ModuleKind {
3031
- None = "None",
3032
- CommonJS = "CommonJS",
3033
- AMD = "AMD",
3034
- UMD = "UMD",
3035
- System = "System",
3036
- ES6 = "ES6",
3037
- ES2015 = "ES2015",
3038
- ESNext = "ESNext",
3039
- Node16 = "Node16",
3040
- NodeNext = "NodeNext",
3041
- Preserve = "Preserve",
3042
- }
3043
- enum ModuleResolutionKind {
3044
- Classic = "Classic",
2355
+ export type EditorSettings = ChangePropertyTypes<ts.EditorSettings, {
2356
+ indentStyle: IndentStyle | ts.IndentStyle;
2357
+ }>;
2358
+ export type FormatCodeSettings = ChangePropertyTypes<ts.FormatCodeSettings, {
2359
+ indentStyle: IndentStyle | ts.IndentStyle;
2360
+ }>;
2361
+ export type CompilerOptions = ChangePropertyTypes<ChangeStringIndexSignature<ts.CompilerOptions, CompilerOptionsValue>, {
2362
+ jsx: JsxEmit | ts.JsxEmit;
2363
+ module: ModuleKind | ts.ModuleKind;
2364
+ moduleResolution: ModuleResolutionKind | ts.ModuleResolutionKind;
2365
+ newLine: NewLineKind | ts.NewLineKind;
2366
+ target: ScriptTarget | ts.ScriptTarget;
2367
+ }>;
2368
+ export enum JsxEmit {
2369
+ None = "none",
2370
+ Preserve = "preserve",
2371
+ ReactNative = "react-native",
2372
+ React = "react",
2373
+ ReactJSX = "react-jsx",
2374
+ ReactJSXDev = "react-jsxdev",
2375
+ }
2376
+ export enum ModuleKind {
2377
+ None = "none",
2378
+ CommonJS = "commonjs",
2379
+ AMD = "amd",
2380
+ UMD = "umd",
2381
+ System = "system",
2382
+ ES6 = "es6",
2383
+ ES2015 = "es2015",
2384
+ ES2020 = "es2020",
2385
+ ES2022 = "es2022",
2386
+ ESNext = "esnext",
2387
+ Node16 = "node16",
2388
+ NodeNext = "nodenext",
2389
+ Preserve = "preserve",
2390
+ }
2391
+ export enum ModuleResolutionKind {
2392
+ Classic = "classic",
2393
+ /** @deprecated Renamed to `Node10` */
2394
+ Node = "node",
3045
2395
  /** @deprecated Renamed to `Node10` */
3046
- Node = "Node",
3047
- Node10 = "Node10",
3048
- Node16 = "Node16",
3049
- NodeNext = "NodeNext",
3050
- Bundler = "Bundler",
2396
+ NodeJs = "node",
2397
+ Node10 = "node10",
2398
+ Node16 = "node16",
2399
+ NodeNext = "nodenext",
2400
+ Bundler = "bundler",
3051
2401
  }
3052
- enum NewLineKind {
2402
+ export enum NewLineKind {
3053
2403
  Crlf = "Crlf",
3054
2404
  Lf = "Lf",
3055
2405
  }
3056
- enum ScriptTarget {
3057
- ES3 = "ES3",
3058
- ES5 = "ES5",
3059
- ES6 = "ES6",
3060
- ES2015 = "ES2015",
3061
- ES2016 = "ES2016",
3062
- ES2017 = "ES2017",
3063
- ES2018 = "ES2018",
3064
- ES2019 = "ES2019",
3065
- ES2020 = "ES2020",
3066
- ES2021 = "ES2021",
3067
- ES2022 = "ES2022",
3068
- ESNext = "ESNext",
3069
- }
3070
- enum ClassificationType {
3071
- comment = 1,
3072
- identifier = 2,
3073
- keyword = 3,
3074
- numericLiteral = 4,
3075
- operator = 5,
3076
- stringLiteral = 6,
3077
- regularExpressionLiteral = 7,
3078
- whiteSpace = 8,
3079
- text = 9,
3080
- punctuation = 10,
3081
- className = 11,
3082
- enumName = 12,
3083
- interfaceName = 13,
3084
- moduleName = 14,
3085
- typeParameterName = 15,
3086
- typeAliasName = 16,
3087
- parameterName = 17,
3088
- docCommentTagName = 18,
3089
- jsxOpenTagName = 19,
3090
- jsxCloseTagName = 20,
3091
- jsxSelfClosingTagName = 21,
3092
- jsxAttribute = 22,
3093
- jsxText = 23,
3094
- jsxAttributeStringLiteralValue = 24,
3095
- bigintLiteral = 25,
2406
+ export enum ScriptTarget {
2407
+ /** @deprecated */
2408
+ ES3 = "es3",
2409
+ ES5 = "es5",
2410
+ ES6 = "es6",
2411
+ ES2015 = "es2015",
2412
+ ES2016 = "es2016",
2413
+ ES2017 = "es2017",
2414
+ ES2018 = "es2018",
2415
+ ES2019 = "es2019",
2416
+ ES2020 = "es2020",
2417
+ ES2021 = "es2021",
2418
+ ES2022 = "es2022",
2419
+ ES2023 = "es2023",
2420
+ ESNext = "esnext",
2421
+ JSON = "json",
2422
+ Latest = "esnext",
3096
2423
  }
3097
2424
  }
3098
2425
  namespace typingsInstaller {
@@ -3141,6 +2468,90 @@ declare namespace ts {
3141
2468
  protected readonly latestDistTag = "latest";
3142
2469
  }
3143
2470
  }
2471
+ type ActionSet = "action::set";
2472
+ type ActionInvalidate = "action::invalidate";
2473
+ type ActionPackageInstalled = "action::packageInstalled";
2474
+ type EventTypesRegistry = "event::typesRegistry";
2475
+ type EventBeginInstallTypes = "event::beginInstallTypes";
2476
+ type EventEndInstallTypes = "event::endInstallTypes";
2477
+ type EventInitializationFailed = "event::initializationFailed";
2478
+ type ActionWatchTypingLocations = "action::watchTypingLocations";
2479
+ interface TypingInstallerResponse {
2480
+ readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations;
2481
+ }
2482
+ interface TypingInstallerRequestWithProjectName {
2483
+ readonly projectName: string;
2484
+ }
2485
+ interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
2486
+ readonly fileNames: string[];
2487
+ readonly projectRootPath: Path;
2488
+ readonly compilerOptions: CompilerOptions;
2489
+ readonly typeAcquisition: TypeAcquisition;
2490
+ readonly unresolvedImports: SortedReadonlyArray<string>;
2491
+ readonly cachePath?: string;
2492
+ readonly kind: "discover";
2493
+ }
2494
+ interface CloseProject extends TypingInstallerRequestWithProjectName {
2495
+ readonly kind: "closeProject";
2496
+ }
2497
+ interface TypesRegistryRequest {
2498
+ readonly kind: "typesRegistry";
2499
+ }
2500
+ interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
2501
+ readonly kind: "installPackage";
2502
+ readonly fileName: Path;
2503
+ readonly packageName: string;
2504
+ readonly projectRootPath: Path;
2505
+ readonly id: number;
2506
+ }
2507
+ interface PackageInstalledResponse extends ProjectResponse {
2508
+ readonly kind: ActionPackageInstalled;
2509
+ readonly id: number;
2510
+ readonly success: boolean;
2511
+ readonly message: string;
2512
+ }
2513
+ interface InitializationFailedResponse extends TypingInstallerResponse {
2514
+ readonly kind: EventInitializationFailed;
2515
+ readonly message: string;
2516
+ readonly stack?: string;
2517
+ }
2518
+ interface ProjectResponse extends TypingInstallerResponse {
2519
+ readonly projectName: string;
2520
+ }
2521
+ interface InvalidateCachedTypings extends ProjectResponse {
2522
+ readonly kind: ActionInvalidate;
2523
+ }
2524
+ interface InstallTypes extends ProjectResponse {
2525
+ readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
2526
+ readonly eventId: number;
2527
+ readonly typingsInstallerVersion: string;
2528
+ readonly packagesToInstall: readonly string[];
2529
+ }
2530
+ interface BeginInstallTypes extends InstallTypes {
2531
+ readonly kind: EventBeginInstallTypes;
2532
+ }
2533
+ interface EndInstallTypes extends InstallTypes {
2534
+ readonly kind: EventEndInstallTypes;
2535
+ readonly installSuccess: boolean;
2536
+ }
2537
+ interface InstallTypingHost extends JsTyping.TypingResolutionHost {
2538
+ useCaseSensitiveFileNames: boolean;
2539
+ writeFile(path: string, content: string): void;
2540
+ createDirectory(path: string): void;
2541
+ getCurrentDirectory?(): string;
2542
+ }
2543
+ interface SetTypings extends ProjectResponse {
2544
+ readonly typeAcquisition: TypeAcquisition;
2545
+ readonly compilerOptions: CompilerOptions;
2546
+ readonly typings: string[];
2547
+ readonly unresolvedImports: SortedReadonlyArray<string>;
2548
+ readonly kind: ActionSet;
2549
+ }
2550
+ interface WatchTypingLocations extends ProjectResponse {
2551
+ /** if files is undefined, retain same set of watchers */
2552
+ readonly files: readonly string[] | undefined;
2553
+ readonly kind: ActionWatchTypingLocations;
2554
+ }
3144
2555
  interface CompressedData {
3145
2556
  length: number;
3146
2557
  compressionKind: string;
@@ -3403,7 +2814,6 @@ declare namespace ts {
3403
2814
  addMissingFileRoot(fileName: NormalizedPath): void;
3404
2815
  removeFile(info: ScriptInfo, fileExists: boolean, detachFromProject: boolean): void;
3405
2816
  registerFileUpdate(fileName: string): void;
3406
- markAsDirty(): void;
3407
2817
  /**
3408
2818
  * Updates set of files that contribute to this project
3409
2819
  * @returns: true if set of files in the project stays the same and false - otherwise.
@@ -3448,10 +2858,8 @@ declare namespace ts {
3448
2858
  class AutoImportProviderProject extends Project {
3449
2859
  private hostProject;
3450
2860
  private rootFileNames;
3451
- isOrphan(): boolean;
3452
2861
  updateGraph(): boolean;
3453
2862
  hasRoots(): boolean;
3454
- markAsDirty(): void;
3455
2863
  getScriptFileNames(): string[];
3456
2864
  getLanguageService(): never;
3457
2865
  getHostForAutoImportProvider(): never;
@@ -3708,7 +3116,7 @@ declare namespace ts {
3708
3116
  /**
3709
3117
  * Open files: with value being project root path, and key being Path of the file that is open
3710
3118
  */
3711
- readonly openFiles: Map<string, NormalizedPath | undefined>;
3119
+ readonly openFiles: Map<Path, NormalizedPath | undefined>;
3712
3120
  /**
3713
3121
  * Map of open files that are opened without complete path but have projectRoot as current directory
3714
3122
  */
@@ -3777,6 +3185,13 @@ declare namespace ts {
3777
3185
  private delayUpdateSourceInfoProjects;
3778
3186
  private delayUpdateProjectsOfScriptInfoPath;
3779
3187
  private handleDeletedFile;
3188
+ /**
3189
+ * This function goes through all the openFiles and tries to file the config file for them.
3190
+ * If the config file is found and it refers to existing project, it schedules the reload it for reload
3191
+ * If there is no existing project it just opens the configured project for the config file
3192
+ * shouldReloadProjectFor provides a way to filter out files to reload configured project for
3193
+ */
3194
+ private delayReloadConfiguredProjectsForFile;
3780
3195
  private removeProject;
3781
3196
  private assignOrphanScriptInfosToInferredProject;
3782
3197
  /**
@@ -3823,7 +3238,6 @@ declare namespace ts {
3823
3238
  private addFilesToNonInferredProject;
3824
3239
  private updateNonInferredProjectFiles;
3825
3240
  private updateRootAndOptionsOfNonInferredProject;
3826
- private sendConfigFileDiagEvent;
3827
3241
  private getOrCreateInferredProjectForProjectRootPathIfEnabled;
3828
3242
  private getOrCreateSingleInferredProjectIfEnabled;
3829
3243
  private getOrCreateSingleInferredWithoutProjectRoot;
@@ -3837,7 +3251,6 @@ declare namespace ts {
3837
3251
  private refreshScriptInfosInDirectory;
3838
3252
  private stopWatchingScriptInfo;
3839
3253
  private getOrCreateScriptInfoNotOpenedByClientForNormalizedPath;
3840
- private getOrCreateScriptInfoOpenedByClientForNormalizedPath;
3841
3254
  getOrCreateScriptInfoForNormalizedPath(fileName: NormalizedPath, openedByClient: boolean, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, hostToQueryFileExistsOn?: {
3842
3255
  fileExists(path: string): boolean;
3843
3256
  }): ScriptInfo | undefined;
@@ -3859,9 +3272,7 @@ declare namespace ts {
3859
3272
  /**
3860
3273
  * This function goes through all the openFiles and tries to file the config file for them.
3861
3274
  * If the config file is found and it refers to existing project, it reloads it either immediately
3862
- * or schedules it for reload depending on delayReload option
3863
3275
  * If there is no existing project it just opens the configured project for the config file
3864
- * reloadForInfo provides a way to filter out files to reload configured project for
3865
3276
  */
3866
3277
  private reloadConfiguredProjectForFiles;
3867
3278
  /**
@@ -3911,7 +3322,6 @@ declare namespace ts {
3911
3322
  hasDeferredExtension(): boolean;
3912
3323
  private enableRequestedPluginsAsync;
3913
3324
  private enableRequestedPluginsWorker;
3914
- private enableRequestedPluginsForProjectAsync;
3915
3325
  configurePlugin(args: protocol.ConfigurePluginRequestArguments): void;
3916
3326
  }
3917
3327
  function formatMessage<T extends protocol.Message>(msg: T, logger: Logger, byteLength: (s: string, encoding: BufferEncoding) => number, newLine: string): string;
@@ -4139,7 +3549,15 @@ declare namespace ts {
4139
3549
  responseRequired?: boolean;
4140
3550
  }
4141
3551
  }
4142
- const versionMajorMinor = "5.4";
3552
+ namespace JsTyping {
3553
+ interface TypingResolutionHost {
3554
+ directoryExists(path: string): boolean;
3555
+ fileExists(fileName: string): boolean;
3556
+ readFile(path: string, encoding?: string): string | undefined;
3557
+ readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
3558
+ }
3559
+ }
3560
+ const versionMajorMinor = "5.5";
4143
3561
  /** The version of the TypeScript compiler release */
4144
3562
  const version: string;
4145
3563
  /**
@@ -4478,65 +3896,59 @@ declare namespace ts {
4478
3896
  ShorthandPropertyAssignment = 304,
4479
3897
  SpreadAssignment = 305,
4480
3898
  EnumMember = 306,
4481
- /** @deprecated */ UnparsedPrologue = 307,
4482
- /** @deprecated */ UnparsedPrepend = 308,
4483
- /** @deprecated */ UnparsedText = 309,
4484
- /** @deprecated */ UnparsedInternalText = 310,
4485
- /** @deprecated */ UnparsedSyntheticReference = 311,
4486
- SourceFile = 312,
4487
- Bundle = 313,
4488
- /** @deprecated */ UnparsedSource = 314,
4489
- /** @deprecated */ InputFiles = 315,
4490
- JSDocTypeExpression = 316,
4491
- JSDocNameReference = 317,
4492
- JSDocMemberName = 318,
4493
- JSDocAllType = 319,
4494
- JSDocUnknownType = 320,
4495
- JSDocNullableType = 321,
4496
- JSDocNonNullableType = 322,
4497
- JSDocOptionalType = 323,
4498
- JSDocFunctionType = 324,
4499
- JSDocVariadicType = 325,
4500
- JSDocNamepathType = 326,
4501
- JSDoc = 327,
3899
+ SourceFile = 307,
3900
+ Bundle = 308,
3901
+ JSDocTypeExpression = 309,
3902
+ JSDocNameReference = 310,
3903
+ JSDocMemberName = 311,
3904
+ JSDocAllType = 312,
3905
+ JSDocUnknownType = 313,
3906
+ JSDocNullableType = 314,
3907
+ JSDocNonNullableType = 315,
3908
+ JSDocOptionalType = 316,
3909
+ JSDocFunctionType = 317,
3910
+ JSDocVariadicType = 318,
3911
+ JSDocNamepathType = 319,
3912
+ JSDoc = 320,
4502
3913
  /** @deprecated Use SyntaxKind.JSDoc */
4503
- JSDocComment = 327,
4504
- JSDocText = 328,
4505
- JSDocTypeLiteral = 329,
4506
- JSDocSignature = 330,
4507
- JSDocLink = 331,
4508
- JSDocLinkCode = 332,
4509
- JSDocLinkPlain = 333,
4510
- JSDocTag = 334,
4511
- JSDocAugmentsTag = 335,
4512
- JSDocImplementsTag = 336,
4513
- JSDocAuthorTag = 337,
4514
- JSDocDeprecatedTag = 338,
4515
- JSDocClassTag = 339,
4516
- JSDocPublicTag = 340,
4517
- JSDocPrivateTag = 341,
4518
- JSDocProtectedTag = 342,
4519
- JSDocReadonlyTag = 343,
4520
- JSDocOverrideTag = 344,
4521
- JSDocCallbackTag = 345,
4522
- JSDocOverloadTag = 346,
4523
- JSDocEnumTag = 347,
4524
- JSDocParameterTag = 348,
4525
- JSDocReturnTag = 349,
4526
- JSDocThisTag = 350,
4527
- JSDocTypeTag = 351,
4528
- JSDocTemplateTag = 352,
4529
- JSDocTypedefTag = 353,
4530
- JSDocSeeTag = 354,
4531
- JSDocPropertyTag = 355,
4532
- JSDocThrowsTag = 356,
4533
- JSDocSatisfiesTag = 357,
4534
- SyntaxList = 358,
4535
- NotEmittedStatement = 359,
4536
- PartiallyEmittedExpression = 360,
4537
- CommaListExpression = 361,
4538
- SyntheticReferenceExpression = 362,
4539
- Count = 363,
3914
+ JSDocComment = 320,
3915
+ JSDocText = 321,
3916
+ JSDocTypeLiteral = 322,
3917
+ JSDocSignature = 323,
3918
+ JSDocLink = 324,
3919
+ JSDocLinkCode = 325,
3920
+ JSDocLinkPlain = 326,
3921
+ JSDocTag = 327,
3922
+ JSDocAugmentsTag = 328,
3923
+ JSDocImplementsTag = 329,
3924
+ JSDocAuthorTag = 330,
3925
+ JSDocDeprecatedTag = 331,
3926
+ JSDocClassTag = 332,
3927
+ JSDocPublicTag = 333,
3928
+ JSDocPrivateTag = 334,
3929
+ JSDocProtectedTag = 335,
3930
+ JSDocReadonlyTag = 336,
3931
+ JSDocOverrideTag = 337,
3932
+ JSDocCallbackTag = 338,
3933
+ JSDocOverloadTag = 339,
3934
+ JSDocEnumTag = 340,
3935
+ JSDocParameterTag = 341,
3936
+ JSDocReturnTag = 342,
3937
+ JSDocThisTag = 343,
3938
+ JSDocTypeTag = 344,
3939
+ JSDocTemplateTag = 345,
3940
+ JSDocTypedefTag = 346,
3941
+ JSDocSeeTag = 347,
3942
+ JSDocPropertyTag = 348,
3943
+ JSDocThrowsTag = 349,
3944
+ JSDocSatisfiesTag = 350,
3945
+ JSDocImportTag = 351,
3946
+ SyntaxList = 352,
3947
+ NotEmittedStatement = 353,
3948
+ PartiallyEmittedExpression = 354,
3949
+ CommaListExpression = 355,
3950
+ SyntheticReferenceExpression = 356,
3951
+ Count = 357,
4540
3952
  FirstAssignment = 64,
4541
3953
  LastAssignment = 79,
4542
3954
  FirstCompoundAssignment = 65,
@@ -4564,10 +3976,10 @@ declare namespace ts {
4564
3976
  FirstStatement = 243,
4565
3977
  LastStatement = 259,
4566
3978
  FirstNode = 166,
4567
- FirstJSDocNode = 316,
4568
- LastJSDocNode = 357,
4569
- FirstJSDocTagNode = 334,
4570
- LastJSDocTagNode = 357,
3979
+ FirstJSDocNode = 309,
3980
+ LastJSDocNode = 351,
3981
+ FirstJSDocTagNode = 327,
3982
+ LastJSDocTagNode = 351,
4571
3983
  }
4572
3984
  type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
4573
3985
  type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@@ -4722,7 +4134,7 @@ declare namespace ts {
4722
4134
  type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
4723
4135
  type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
4724
4136
  type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
4725
- type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind;
4137
+ type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind;
4726
4138
  enum NodeFlags {
4727
4139
  None = 0,
4728
4140
  Let = 1,
@@ -4803,7 +4215,7 @@ declare namespace ts {
4803
4215
  getSourceFile(): SourceFile;
4804
4216
  getChildCount(sourceFile?: SourceFile): number;
4805
4217
  getChildAt(index: number, sourceFile?: SourceFile): Node;
4806
- getChildren(sourceFile?: SourceFile): Node[];
4218
+ getChildren(sourceFile?: SourceFile): readonly Node[];
4807
4219
  getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
4808
4220
  getFullStart(): number;
4809
4221
  getEnd(): number;
@@ -4966,12 +4378,6 @@ declare namespace ts {
4966
4378
  interface Identifier {
4967
4379
  readonly text: string;
4968
4380
  }
4969
- interface Identifier {
4970
- /** @deprecated Use `idKeyword(identifier)` instead. */
4971
- readonly originalKeywordKind?: SyntaxKind;
4972
- /** @deprecated Use `.parent` or the surrounding context to determine this instead. */
4973
- readonly isInJSDocNamespace?: boolean;
4974
- }
4975
4381
  interface TransientIdentifier extends Identifier {
4976
4382
  resolvedSymbol: Symbol;
4977
4383
  }
@@ -6017,7 +5423,7 @@ declare namespace ts {
6017
5423
  type NamedExportBindings = NamespaceExport | NamedExports;
6018
5424
  interface ImportClause extends NamedDeclaration {
6019
5425
  readonly kind: SyntaxKind.ImportClause;
6020
- readonly parent: ImportDeclaration;
5426
+ readonly parent: ImportDeclaration | JSDocImportTag;
6021
5427
  readonly isTypeOnly: boolean;
6022
5428
  readonly name?: Identifier;
6023
5429
  readonly namedBindings?: NamedImportBindings;
@@ -6156,6 +5562,7 @@ declare namespace ts {
6156
5562
  interface FileReference extends TextRange {
6157
5563
  fileName: string;
6158
5564
  resolutionMode?: ResolutionMode;
5565
+ preserve?: boolean;
6159
5566
  }
6160
5567
  interface CheckJsDirective extends TextRange {
6161
5568
  enabled: boolean;
@@ -6373,60 +5780,12 @@ declare namespace ts {
6373
5780
  readonly kind: SyntaxKind.JSDocSatisfiesTag;
6374
5781
  readonly typeExpression: JSDocTypeExpression;
6375
5782
  }
6376
- enum FlowFlags {
6377
- Unreachable = 1,
6378
- Start = 2,
6379
- BranchLabel = 4,
6380
- LoopLabel = 8,
6381
- Assignment = 16,
6382
- TrueCondition = 32,
6383
- FalseCondition = 64,
6384
- SwitchClause = 128,
6385
- ArrayMutation = 256,
6386
- Call = 512,
6387
- ReduceLabel = 1024,
6388
- Referenced = 2048,
6389
- Shared = 4096,
6390
- Label = 12,
6391
- Condition = 96,
6392
- }
6393
- type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel;
6394
- interface FlowNodeBase {
6395
- flags: FlowFlags;
6396
- id?: number;
6397
- }
6398
- interface FlowStart extends FlowNodeBase {
6399
- node?: FunctionExpression | ArrowFunction | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration;
6400
- }
6401
- interface FlowLabel extends FlowNodeBase {
6402
- antecedents: FlowNode[] | undefined;
6403
- }
6404
- interface FlowAssignment extends FlowNodeBase {
6405
- node: Expression | VariableDeclaration | BindingElement;
6406
- antecedent: FlowNode;
6407
- }
6408
- interface FlowCall extends FlowNodeBase {
6409
- node: CallExpression;
6410
- antecedent: FlowNode;
6411
- }
6412
- interface FlowCondition extends FlowNodeBase {
6413
- node: Expression;
6414
- antecedent: FlowNode;
6415
- }
6416
- interface FlowSwitchClause extends FlowNodeBase {
6417
- switchStatement: SwitchStatement;
6418
- clauseStart: number;
6419
- clauseEnd: number;
6420
- antecedent: FlowNode;
6421
- }
6422
- interface FlowArrayMutation extends FlowNodeBase {
6423
- node: CallExpression | BinaryExpression;
6424
- antecedent: FlowNode;
6425
- }
6426
- interface FlowReduceLabel extends FlowNodeBase {
6427
- target: FlowLabel;
6428
- antecedents: FlowNode[];
6429
- antecedent: FlowNode;
5783
+ interface JSDocImportTag extends JSDocTag {
5784
+ readonly kind: SyntaxKind.JSDocImportTag;
5785
+ readonly parent: JSDoc;
5786
+ readonly importClause?: ImportClause;
5787
+ readonly moduleSpecifier: Expression;
5788
+ readonly attributes?: ImportAttributes;
6430
5789
  }
6431
5790
  type FlowType = Type | IncompleteType;
6432
5791
  interface IncompleteType {
@@ -6498,70 +5857,8 @@ declare namespace ts {
6498
5857
  }
6499
5858
  interface Bundle extends Node {
6500
5859
  readonly kind: SyntaxKind.Bundle;
6501
- /** @deprecated */ readonly prepends: readonly (InputFiles | UnparsedSource)[];
6502
5860
  readonly sourceFiles: readonly SourceFile[];
6503
5861
  }
6504
- /** @deprecated */
6505
- interface InputFiles extends Node {
6506
- readonly kind: SyntaxKind.InputFiles;
6507
- javascriptPath?: string;
6508
- javascriptText: string;
6509
- javascriptMapPath?: string;
6510
- javascriptMapText?: string;
6511
- declarationPath?: string;
6512
- declarationText: string;
6513
- declarationMapPath?: string;
6514
- declarationMapText?: string;
6515
- }
6516
- /** @deprecated */
6517
- interface UnparsedSource extends Node {
6518
- readonly kind: SyntaxKind.UnparsedSource;
6519
- fileName: string;
6520
- text: string;
6521
- readonly prologues: readonly UnparsedPrologue[];
6522
- helpers: readonly UnscopedEmitHelper[] | undefined;
6523
- referencedFiles: readonly FileReference[];
6524
- typeReferenceDirectives: readonly FileReference[] | undefined;
6525
- libReferenceDirectives: readonly FileReference[];
6526
- hasNoDefaultLib?: boolean;
6527
- sourceMapPath?: string;
6528
- sourceMapText?: string;
6529
- readonly syntheticReferences?: readonly UnparsedSyntheticReference[];
6530
- readonly texts: readonly UnparsedSourceText[];
6531
- }
6532
- /** @deprecated */
6533
- type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
6534
- /** @deprecated */
6535
- type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;
6536
- /** @deprecated */
6537
- interface UnparsedSection extends Node {
6538
- readonly kind: SyntaxKind;
6539
- readonly parent: UnparsedSource;
6540
- readonly data?: string;
6541
- }
6542
- /** @deprecated */
6543
- interface UnparsedPrologue extends UnparsedSection {
6544
- readonly kind: SyntaxKind.UnparsedPrologue;
6545
- readonly parent: UnparsedSource;
6546
- readonly data: string;
6547
- }
6548
- /** @deprecated */
6549
- interface UnparsedPrepend extends UnparsedSection {
6550
- readonly kind: SyntaxKind.UnparsedPrepend;
6551
- readonly parent: UnparsedSource;
6552
- readonly data: string;
6553
- readonly texts: readonly UnparsedTextLike[];
6554
- }
6555
- /** @deprecated */
6556
- interface UnparsedTextLike extends UnparsedSection {
6557
- readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
6558
- readonly parent: UnparsedSource;
6559
- }
6560
- /** @deprecated */
6561
- interface UnparsedSyntheticReference extends UnparsedSection {
6562
- readonly kind: SyntaxKind.UnparsedSyntheticReference;
6563
- readonly parent: UnparsedSource;
6564
- }
6565
5862
  interface JsonSourceFile extends SourceFile {
6566
5863
  readonly statements: NodeArray<JsonObjectExpressionStatement>;
6567
5864
  }
@@ -6658,19 +5955,67 @@ declare namespace ts {
6658
5955
  isSourceFileFromExternalLibrary(file: SourceFile): boolean;
6659
5956
  isSourceFileDefaultLibrary(file: SourceFile): boolean;
6660
5957
  /**
6661
- * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import
6662
- * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may
6663
- * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other
6664
- * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no
6665
- * impact on module resolution, emit, or type checking.
5958
+ * Calculates the final resolution mode for a given module reference node. This function only returns a result when module resolution
5959
+ * settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided via import attributes,
5960
+ * which cause an `import` or `require` condition to be used during resolution regardless of module resolution settings. In absence of
5961
+ * overriding attributes, and in modes that support differing resolution, the result indicates the syntax the usage would emit to JavaScript.
5962
+ * Some examples:
5963
+ *
5964
+ * ```ts
5965
+ * // tsc foo.mts --module nodenext
5966
+ * import {} from "mod";
5967
+ * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension
5968
+ *
5969
+ * // tsc foo.cts --module nodenext
5970
+ * import {} from "mod";
5971
+ * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension
5972
+ *
5973
+ * // tsc foo.ts --module preserve --moduleResolution bundler
5974
+ * import {} from "mod";
5975
+ * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler`
5976
+ * // supports conditional imports/exports
5977
+ *
5978
+ * // tsc foo.ts --module preserve --moduleResolution node10
5979
+ * import {} from "mod";
5980
+ * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10`
5981
+ * // does not support conditional imports/exports
5982
+ *
5983
+ * // tsc foo.ts --module commonjs --moduleResolution node10
5984
+ * import type {} from "mod" with { "resolution-mode": "import" };
5985
+ * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute
5986
+ * ```
6666
5987
  */
6667
5988
  getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode;
6668
5989
  /**
6669
- * Calculates the final resolution mode for an import at some index within a file's `imports` list. This is the resolution mode
6670
- * explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In
6671
- * `--module node16` or `nodenext`, this may depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the
6672
- * input syntax of the reference. In other `module` modes, when overriding import attributes are not provided, this function returns
6673
- * `undefined`, as the result would have no impact on module resolution, emit, or type checking.
5990
+ * Calculates the final resolution mode for an import at some index within a file's `imports` list. This function only returns a result
5991
+ * when module resolution settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided
5992
+ * via import attributes, which cause an `import` or `require` condition to be used during resolution regardless of module resolution
5993
+ * settings. In absence of overriding attributes, and in modes that support differing resolution, the result indicates the syntax the
5994
+ * usage would emit to JavaScript. Some examples:
5995
+ *
5996
+ * ```ts
5997
+ * // tsc foo.mts --module nodenext
5998
+ * import {} from "mod";
5999
+ * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension
6000
+ *
6001
+ * // tsc foo.cts --module nodenext
6002
+ * import {} from "mod";
6003
+ * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension
6004
+ *
6005
+ * // tsc foo.ts --module preserve --moduleResolution bundler
6006
+ * import {} from "mod";
6007
+ * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler`
6008
+ * // supports conditional imports/exports
6009
+ *
6010
+ * // tsc foo.ts --module preserve --moduleResolution node10
6011
+ * import {} from "mod";
6012
+ * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10`
6013
+ * // does not support conditional imports/exports
6014
+ *
6015
+ * // tsc foo.ts --module commonjs --moduleResolution node10
6016
+ * import type {} from "mod" with { "resolution-mode": "import" };
6017
+ * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute
6018
+ * ```
6674
6019
  */
6675
6020
  getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode;
6676
6021
  getProjectReferences(): readonly ProjectReference[] | undefined;
@@ -7242,6 +6587,7 @@ declare namespace ts {
7242
6587
  ContainsSpread = 2097152,
7243
6588
  ObjectRestType = 4194304,
7244
6589
  InstantiationExpressionType = 8388608,
6590
+ SingleSignatureType = 134217728,
7245
6591
  }
7246
6592
  interface ObjectType extends Type {
7247
6593
  objectFlags: ObjectFlags;
@@ -7496,7 +6842,7 @@ declare namespace ts {
7496
6842
  path: string;
7497
6843
  /** The path as the user originally wrote it */
7498
6844
  originalPath?: string;
7499
- /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
6845
+ /** @deprecated */
7500
6846
  prepend?: boolean;
7501
6847
  /** True if it is intended that this reference form a circularity */
7502
6848
  circular?: boolean;
@@ -7532,6 +6878,7 @@ declare namespace ts {
7532
6878
  allowUnusedLabels?: boolean;
7533
6879
  alwaysStrict?: boolean;
7534
6880
  baseUrl?: string;
6881
+ /** @deprecated */
7535
6882
  charset?: string;
7536
6883
  checkJs?: boolean;
7537
6884
  customConditions?: string[];
@@ -7551,11 +6898,14 @@ declare namespace ts {
7551
6898
  forceConsistentCasingInFileNames?: boolean;
7552
6899
  ignoreDeprecations?: string;
7553
6900
  importHelpers?: boolean;
6901
+ /** @deprecated */
7554
6902
  importsNotUsedAsValues?: ImportsNotUsedAsValues;
7555
6903
  inlineSourceMap?: boolean;
7556
6904
  inlineSources?: boolean;
7557
6905
  isolatedModules?: boolean;
6906
+ isolatedDeclarations?: boolean;
7558
6907
  jsx?: JsxEmit;
6908
+ /** @deprecated */
7559
6909
  keyofStringsOnly?: boolean;
7560
6910
  lib?: string[];
7561
6911
  locale?: string;
@@ -7574,15 +6924,18 @@ declare namespace ts {
7574
6924
  noImplicitAny?: boolean;
7575
6925
  noImplicitReturns?: boolean;
7576
6926
  noImplicitThis?: boolean;
6927
+ /** @deprecated */
7577
6928
  noStrictGenericChecks?: boolean;
7578
6929
  noUnusedLocals?: boolean;
7579
6930
  noUnusedParameters?: boolean;
6931
+ /** @deprecated */
7580
6932
  noImplicitUseStrict?: boolean;
7581
6933
  noPropertyAccessFromIndexSignature?: boolean;
7582
6934
  assumeChangesOnlyAffectDirectDependencies?: boolean;
7583
6935
  noLib?: boolean;
7584
6936
  noResolve?: boolean;
7585
6937
  noUncheckedIndexedAccess?: boolean;
6938
+ /** @deprecated */
7586
6939
  out?: string;
7587
6940
  outDir?: string;
7588
6941
  outFile?: string;
@@ -7590,6 +6943,7 @@ declare namespace ts {
7590
6943
  preserveConstEnums?: boolean;
7591
6944
  noImplicitOverride?: boolean;
7592
6945
  preserveSymlinks?: boolean;
6946
+ /** @deprecated */
7593
6947
  preserveValueImports?: boolean;
7594
6948
  project?: string;
7595
6949
  reactNamespace?: string;
@@ -7614,7 +6968,9 @@ declare namespace ts {
7614
6968
  strictNullChecks?: boolean;
7615
6969
  strictPropertyInitialization?: boolean;
7616
6970
  stripInternal?: boolean;
6971
+ /** @deprecated */
7617
6972
  suppressExcessPropertyErrors?: boolean;
6973
+ /** @deprecated */
7618
6974
  suppressImplicitAnyIndexErrors?: boolean;
7619
6975
  target?: ScriptTarget;
7620
6976
  traceResolution?: boolean;
@@ -7666,6 +7022,7 @@ declare namespace ts {
7666
7022
  ReactJSX = 4,
7667
7023
  ReactJSXDev = 5,
7668
7024
  }
7025
+ /** @deprecated */
7669
7026
  enum ImportsNotUsedAsValues {
7670
7027
  Remove = 0,
7671
7028
  Preserve = 1,
@@ -7695,6 +7052,7 @@ declare namespace ts {
7695
7052
  Deferred = 7,
7696
7053
  }
7697
7054
  enum ScriptTarget {
7055
+ /** @deprecated */
7698
7056
  ES3 = 0,
7699
7057
  ES5 = 1,
7700
7058
  ES2015 = 2,
@@ -7705,6 +7063,7 @@ declare namespace ts {
7705
7063
  ES2020 = 7,
7706
7064
  ES2021 = 8,
7707
7065
  ES2022 = 9,
7066
+ ES2023 = 10,
7708
7067
  ESNext = 99,
7709
7068
  JSON = 100,
7710
7069
  Latest = 99,
@@ -8337,6 +7696,8 @@ declare namespace ts {
8337
7696
  updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined): JSDocThrowsTag;
8338
7697
  createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocSatisfiesTag;
8339
7698
  updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocSatisfiesTag;
7699
+ createJSDocImportTag(tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: string | NodeArray<JSDocComment>): JSDocImportTag;
7700
+ updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes: ImportAttributes | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocImportTag;
8340
7701
  createJSDocText(text: string): JSDocText;
8341
7702
  updateJSDocText(node: JSDocText, text: string): JSDocText;
8342
7703
  createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
@@ -8389,9 +7750,7 @@ declare namespace ts {
8389
7750
  createCommaListExpression(elements: readonly Expression[]): CommaListExpression;
8390
7751
  updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
8391
7752
  createBundle(sourceFiles: readonly SourceFile[]): Bundle;
8392
- /** @deprecated*/ createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
8393
7753
  updateBundle(node: Bundle, sourceFiles: readonly SourceFile[]): Bundle;
8394
- /** @deprecated*/ updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
8395
7754
  createComma(left: Expression, right: Expression): BinaryExpression;
8396
7755
  createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
8397
7756
  createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>;
@@ -8670,7 +8029,6 @@ declare namespace ts {
8670
8029
  }
8671
8030
  interface SyntaxList extends Node {
8672
8031
  kind: SyntaxKind.SyntaxList;
8673
- _children: Node[];
8674
8032
  }
8675
8033
  enum ListFormat {
8676
8034
  None = 0,
@@ -8773,13 +8131,49 @@ declare namespace ts {
8773
8131
  interface UserPreferences {
8774
8132
  readonly disableSuggestions?: boolean;
8775
8133
  readonly quotePreference?: "auto" | "double" | "single";
8134
+ /**
8135
+ * If enabled, TypeScript will search through all external modules' exports and add them to the completions list.
8136
+ * This affects lone identifier completions but not completions on the right hand side of `obj.`.
8137
+ */
8776
8138
  readonly includeCompletionsForModuleExports?: boolean;
8139
+ /**
8140
+ * Enables auto-import-style completions on partially-typed import statements. E.g., allows
8141
+ * `import write|` to be completed to `import { writeFile } from "fs"`.
8142
+ */
8777
8143
  readonly includeCompletionsForImportStatements?: boolean;
8144
+ /**
8145
+ * Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`.
8146
+ */
8778
8147
  readonly includeCompletionsWithSnippetText?: boolean;
8148
+ /**
8149
+ * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled,
8150
+ * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined
8151
+ * values, with insertion text to replace preceding `.` tokens with `?.`.
8152
+ */
8779
8153
  readonly includeAutomaticOptionalChainCompletions?: boolean;
8154
+ /**
8155
+ * If enabled, the completion list will include completions with invalid identifier names.
8156
+ * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
8157
+ */
8780
8158
  readonly includeCompletionsWithInsertText?: boolean;
8159
+ /**
8160
+ * If enabled, completions for class members (e.g. methods and properties) will include
8161
+ * a whole declaration for the member.
8162
+ * E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of
8163
+ * `class A { foo }`.
8164
+ */
8781
8165
  readonly includeCompletionsWithClassMemberSnippets?: boolean;
8166
+ /**
8167
+ * If enabled, object literal methods will have a method declaration completion entry in addition
8168
+ * to the regular completion entry containing just the method name.
8169
+ * E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`,
8170
+ * in addition to `const objectLiteral: T = { foo }`.
8171
+ */
8782
8172
  readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
8173
+ /**
8174
+ * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported.
8175
+ * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property.
8176
+ */
8783
8177
  readonly useLabelDetailsInCompletionEntries?: boolean;
8784
8178
  readonly allowIncompleteCompletions?: boolean;
8785
8179
  readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
@@ -8802,15 +8196,76 @@ declare namespace ts {
8802
8196
  readonly allowRenameOfImportPath?: boolean;
8803
8197
  readonly autoImportFileExcludePatterns?: string[];
8804
8198
  readonly preferTypeOnlyAutoImports?: boolean;
8199
+ /**
8200
+ * Indicates whether imports should be organized in a case-insensitive manner.
8201
+ */
8805
8202
  readonly organizeImportsIgnoreCase?: "auto" | boolean;
8203
+ /**
8204
+ * Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value
8205
+ * of their code points, or via "unicode" collation (via the
8206
+ * [Unicode Collation Algorithm](https://unicode.org/reports/tr10/#Scope)) using rules associated with the locale
8207
+ * specified in {@link organizeImportsCollationLocale}.
8208
+ *
8209
+ * Default: `"ordinal"`.
8210
+ */
8806
8211
  readonly organizeImportsCollation?: "ordinal" | "unicode";
8212
+ /**
8213
+ * Indicates the locale to use for "unicode" collation. If not specified, the locale `"en"` is used as an invariant
8214
+ * for the sake of consistent sorting. Use `"auto"` to use the detected UI locale.
8215
+ *
8216
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
8217
+ *
8218
+ * Default: `"en"`
8219
+ */
8807
8220
  readonly organizeImportsLocale?: string;
8221
+ /**
8222
+ * Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate
8223
+ * strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`.
8224
+ *
8225
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
8226
+ *
8227
+ * Default: `false`
8228
+ */
8808
8229
  readonly organizeImportsNumericCollation?: boolean;
8230
+ /**
8231
+ * Indicates whether accents and other diacritic marks are considered unequal for the purpose of collation. When
8232
+ * `true`, characters with accents and other diacritics will be collated in the order defined by the locale specified
8233
+ * in {@link organizeImportsCollationLocale}.
8234
+ *
8235
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
8236
+ *
8237
+ * Default: `true`
8238
+ */
8809
8239
  readonly organizeImportsAccentCollation?: boolean;
8240
+ /**
8241
+ * Indicates whether upper case or lower case should sort first. When `false`, the default order for the locale
8242
+ * specified in {@link organizeImportsCollationLocale} is used.
8243
+ *
8244
+ * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. This preference is also
8245
+ * ignored if we are using case-insensitive sorting, which occurs when {@link organizeImportsIgnoreCase} is `true`,
8246
+ * or if {@link organizeImportsIgnoreCase} is `"auto"` and the auto-detected case sensitivity is determined to be
8247
+ * case-insensitive.
8248
+ *
8249
+ * Default: `false`
8250
+ */
8810
8251
  readonly organizeImportsCaseFirst?: "upper" | "lower" | false;
8811
- readonly organizeImportsTypeOrder?: "first" | "last" | "inline";
8252
+ /**
8253
+ * Indicates where named type-only imports should sort. "inline" sorts named imports without regard to if the import is
8254
+ * type-only.
8255
+ *
8256
+ * Default: `last`
8257
+ */
8258
+ readonly organizeImportsTypeOrder?: OrganizeImportsTypeOrder;
8259
+ /**
8260
+ * Indicates whether to exclude standard library and node_modules file symbols from navTo results.
8261
+ */
8812
8262
  readonly excludeLibrarySymbolsInNavTo?: boolean;
8263
+ readonly lazyConfiguredProjectsFromExternalProject?: boolean;
8264
+ readonly displayPartsForJSDoc?: boolean;
8265
+ readonly generateReturnInDocTemplate?: boolean;
8266
+ readonly disableLineTextInReferences?: boolean;
8813
8267
  }
8268
+ type OrganizeImportsTypeOrder = "last" | "inline" | "first";
8814
8269
  /** Represents a bigint literal value without requiring bigint support */
8815
8270
  interface PseudoBigInt {
8816
8271
  negative: boolean;
@@ -9150,10 +8605,6 @@ declare namespace ts {
9150
8605
  function isNonNullChain(node: Node): node is NonNullChain;
9151
8606
  function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
9152
8607
  function isNamedExportBindings(node: Node): node is NamedExportBindings;
9153
- /** @deprecated */
9154
- function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
9155
- /** @deprecated */
9156
- function isUnparsedNode(node: Node): node is UnparsedNode;
9157
8608
  function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
9158
8609
  /**
9159
8610
  * True if kind is of some token syntax kind.
@@ -9261,18 +8712,6 @@ declare namespace ts {
9261
8712
  * ```
9262
8713
  */
9263
8714
  function getJSDocCommentsAndTags(hostNode: Node): readonly (JSDoc | JSDocTag)[];
9264
- /** @deprecated */
9265
- function createUnparsedSourceFile(text: string): UnparsedSource;
9266
- /** @deprecated */
9267
- function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
9268
- /** @deprecated */
9269
- function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
9270
- /** @deprecated */
9271
- function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
9272
- /** @deprecated */
9273
- function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
9274
- /** @deprecated */
9275
- function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles;
9276
8715
  /**
9277
8716
  * Create an external source map source file reference
9278
8717
  */
@@ -9517,12 +8956,8 @@ declare namespace ts {
9517
8956
  function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
9518
8957
  function isSpreadAssignment(node: Node): node is SpreadAssignment;
9519
8958
  function isEnumMember(node: Node): node is EnumMember;
9520
- /** @deprecated */
9521
- function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
9522
8959
  function isSourceFile(node: Node): node is SourceFile;
9523
8960
  function isBundle(node: Node): node is Bundle;
9524
- /** @deprecated */
9525
- function isUnparsedSource(node: Node): node is UnparsedSource;
9526
8961
  function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
9527
8962
  function isJSDocNameReference(node: Node): node is JSDocNameReference;
9528
8963
  function isJSDocMemberName(node: Node): node is JSDocMemberName;
@@ -9564,6 +8999,7 @@ declare namespace ts {
9564
8999
  function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
9565
9000
  function isJSDocSatisfiesTag(node: Node): node is JSDocSatisfiesTag;
9566
9001
  function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag;
9002
+ function isJSDocImportTag(node: Node): node is JSDocImportTag;
9567
9003
  function isQuestionOrExclamationToken(node: Node): node is QuestionToken | ExclamationToken;
9568
9004
  function isIdentifierOrThisTypeNode(node: Node): node is Identifier | ThisTypeNode;
9569
9005
  function isReadonlyKeywordOrPlusOrMinusToken(node: Node): node is ReadonlyKeyword | PlusToken | MinusToken;
@@ -9932,24 +9368,43 @@ declare namespace ts {
9932
9368
  function getModeForResolutionAtIndex(file: SourceFile, index: number, compilerOptions: CompilerOptions): ResolutionMode;
9933
9369
  /**
9934
9370
  * Use `program.getModeForUsageLocation`, which retrieves the correct `compilerOptions`, instead of this function whenever possible.
9935
- * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import
9936
- * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may
9937
- * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other
9938
- * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no
9939
- * impact on module resolution, emit, or type checking.
9371
+ * Calculates the final resolution mode for a given module reference node. This function only returns a result when module resolution
9372
+ * settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided via import attributes,
9373
+ * which cause an `import` or `require` condition to be used during resolution regardless of module resolution settings. In absence of
9374
+ * overriding attributes, and in modes that support differing resolution, the result indicates the syntax the usage would emit to JavaScript.
9375
+ * Some examples:
9376
+ *
9377
+ * ```ts
9378
+ * // tsc foo.mts --module nodenext
9379
+ * import {} from "mod";
9380
+ * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension
9381
+ *
9382
+ * // tsc foo.cts --module nodenext
9383
+ * import {} from "mod";
9384
+ * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension
9385
+ *
9386
+ * // tsc foo.ts --module preserve --moduleResolution bundler
9387
+ * import {} from "mod";
9388
+ * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler`
9389
+ * // supports conditional imports/exports
9390
+ *
9391
+ * // tsc foo.ts --module preserve --moduleResolution node10
9392
+ * import {} from "mod";
9393
+ * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10`
9394
+ * // does not support conditional imports/exports
9395
+ *
9396
+ * // tsc foo.ts --module commonjs --moduleResolution node10
9397
+ * import type {} from "mod" with { "resolution-mode": "import" };
9398
+ * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute
9399
+ * ```
9400
+ *
9940
9401
  * @param file The file the import or import-like reference is contained within
9941
9402
  * @param usage The module reference string
9942
9403
  * @param compilerOptions The compiler options for the program that owns the file. If the file belongs to a referenced project, the compiler options
9943
9404
  * should be the options of the referenced project, not the referencing project.
9944
9405
  * @returns The final resolution mode of the import
9945
9406
  */
9946
- function getModeForUsageLocation(
9947
- file: {
9948
- impliedNodeFormat?: ResolutionMode;
9949
- },
9950
- usage: StringLiteralLike,
9951
- compilerOptions: CompilerOptions,
9952
- ): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
9407
+ function getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike, compilerOptions: CompilerOptions): ResolutionMode;
9953
9408
  function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
9954
9409
  /**
9955
9410
  * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the
@@ -10341,8 +9796,7 @@ declare namespace ts {
10341
9796
  }
10342
9797
  enum InvalidatedProjectKind {
10343
9798
  Build = 0,
10344
- /** @deprecated */ UpdateBundle = 1,
10345
- UpdateOutputFileStamps = 2,
9799
+ UpdateOutputFileStamps = 1,
10346
9800
  }
10347
9801
  interface InvalidatedProjectBase {
10348
9802
  readonly kind: InvalidatedProjectKind;
@@ -10373,20 +9827,7 @@ declare namespace ts {
10373
9827
  getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
10374
9828
  emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
10375
9829
  }
10376
- /** @deprecated */
10377
- interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
10378
- readonly kind: InvalidatedProjectKind.UpdateBundle;
10379
- emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
10380
- }
10381
- type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>;
10382
- namespace JsTyping {
10383
- interface TypingResolutionHost {
10384
- directoryExists(path: string): boolean;
10385
- fileExists(fileName: string): boolean;
10386
- readFile(path: string, encoding?: string): string | undefined;
10387
- readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
10388
- }
10389
- }
9830
+ type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T>;
10390
9831
  function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
10391
9832
  /**
10392
9833
  * Represents an immutable snapshot of a script at a specified time.Once acquired, the
@@ -10933,6 +10374,19 @@ declare namespace ts {
10933
10374
  * when calling `getEditsForRefactor`.
10934
10375
  */
10935
10376
  isInteractive?: boolean;
10377
+ /**
10378
+ * Range of code the refactoring will be applied to.
10379
+ */
10380
+ range?: {
10381
+ start: {
10382
+ line: number;
10383
+ offset: number;
10384
+ };
10385
+ end: {
10386
+ line: number;
10387
+ offset: number;
10388
+ };
10389
+ };
10936
10390
  }
10937
10391
  /**
10938
10392
  * A set of edits to make in response to a refactor action, plus an optional
@@ -11121,7 +10575,13 @@ declare namespace ts {
11121
10575
  linkText = 24,
11122
10576
  }
11123
10577
  interface SymbolDisplayPart {
10578
+ /**
10579
+ * Text of an item describing the symbol.
10580
+ */
11124
10581
  text: string;
10582
+ /**
10583
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
10584
+ */
11125
10585
  kind: string;
11126
10586
  }
11127
10587
  interface JSDocLinkDisplayPart extends SymbolDisplayPart {
@@ -11173,6 +10633,9 @@ declare namespace ts {
11173
10633
  interface InteractiveRefactorArguments {
11174
10634
  targetFile: string;
11175
10635
  }
10636
+ /**
10637
+ * Signature help information for a single parameter
10638
+ */
11176
10639
  interface SignatureHelpParameter {
11177
10640
  name: string;
11178
10641
  documentation: SymbolDisplayPart[];
@@ -11267,9 +10730,25 @@ declare namespace ts {
11267
10730
  name: string;
11268
10731
  kind: ScriptElementKind;
11269
10732
  kindModifiers?: string;
10733
+ /**
10734
+ * A string that is used for comparing completion items so that they can be ordered. This
10735
+ * is often the same as the name but may be different in certain circumstances.
10736
+ */
11270
10737
  sortText: string;
10738
+ /**
10739
+ * Text to insert instead of `name`.
10740
+ * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`,
10741
+ * coupled with `replacementSpan` to replace a dotted access with a bracket access.
10742
+ */
11271
10743
  insertText?: string;
10744
+ /**
10745
+ * A string that should be used when filtering a set of
10746
+ * completion items.
10747
+ */
11272
10748
  filterText?: string;
10749
+ /**
10750
+ * `insertText` should be interpreted as a snippet if true.
10751
+ */
11273
10752
  isSnippet?: true;
11274
10753
  /**
11275
10754
  * An optional span that indicates the text to be replaced by this completion item.
@@ -11277,13 +10756,43 @@ declare namespace ts {
11277
10756
  * It will be set if the required span differs from the one generated by the default replacement behavior.
11278
10757
  */
11279
10758
  replacementSpan?: TextSpan;
10759
+ /**
10760
+ * Indicates whether commiting this completion entry will require additional code actions to be
10761
+ * made to avoid errors. The CompletionEntryDetails will have these actions.
10762
+ */
11280
10763
  hasAction?: true;
10764
+ /**
10765
+ * Identifier (not necessarily human-readable) identifying where this completion came from.
10766
+ */
11281
10767
  source?: string;
10768
+ /**
10769
+ * Human-readable description of the `source`.
10770
+ */
11282
10771
  sourceDisplay?: SymbolDisplayPart[];
10772
+ /**
10773
+ * Additional details for the label.
10774
+ */
11283
10775
  labelDetails?: CompletionEntryLabelDetails;
10776
+ /**
10777
+ * If true, this completion should be highlighted as recommended. There will only be one of these.
10778
+ * 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.
10779
+ * Then either that enum/class or a namespace containing it will be the recommended symbol.
10780
+ */
11284
10781
  isRecommended?: true;
10782
+ /**
10783
+ * If true, this completion was generated from traversing the name table of an unchecked JS file,
10784
+ * and therefore may not be accurate.
10785
+ */
11285
10786
  isFromUncheckedFile?: true;
10787
+ /**
10788
+ * If true, this completion was for an auto-import of a module not yet in the program, but listed
10789
+ * in the project package.json. Used for telemetry reporting.
10790
+ */
11286
10791
  isPackageJsonImport?: true;
10792
+ /**
10793
+ * If true, this completion was an auto-import-style completion of an import statement (i.e., the
10794
+ * module specifier was inserted along with the imported identifier). Used for telemetry reporting.
10795
+ */
11287
10796
  isImportStatementCompletion?: true;
11288
10797
  /**
11289
10798
  * For API purposes.
@@ -11302,7 +10811,17 @@ declare namespace ts {
11302
10811
  data?: CompletionEntryData;
11303
10812
  }
11304
10813
  interface CompletionEntryLabelDetails {
10814
+ /**
10815
+ * An optional string which is rendered less prominently directly after
10816
+ * {@link CompletionEntry.name name}, without any spacing. Should be
10817
+ * used for function signatures or type annotations.
10818
+ */
11305
10819
  detail?: string;
10820
+ /**
10821
+ * An optional string which is rendered less prominently after
10822
+ * {@link CompletionEntryLabelDetails.detail}. Should be used for fully qualified
10823
+ * names or file path.
10824
+ */
11306
10825
  description?: string;
11307
10826
  }
11308
10827
  interface CompletionEntryDetails {
@@ -11671,6 +11190,7 @@ declare namespace ts {
11671
11190
  };
11672
11191
  function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo;
11673
11192
  function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
11193
+ function transpileDeclaration(input: string, transpileOptions: TranspileOptions): TranspileOutput;
11674
11194
  function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
11675
11195
  interface TranspileOptions {
11676
11196
  compilerOptions?: CompilerOptions;