typescript 7.1.0-dev.20260917.1 → 7.1.0-dev.20260919.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 (57) hide show
  1. package/dist/api/async/api.d.ts +95 -39
  2. package/dist/api/async/api.d.ts.map +1 -1
  3. package/dist/api/async/api.js +144 -93
  4. package/dist/api/async/api.js.map +1 -1
  5. package/dist/api/async/types.d.ts +2 -2
  6. package/dist/api/async/types.d.ts.map +1 -1
  7. package/dist/api/fs.d.ts +11 -11
  8. package/dist/api/fs.d.ts.map +1 -1
  9. package/dist/api/fs.js +5 -5
  10. package/dist/api/fs.js.map +1 -1
  11. package/dist/api/node/encoder.d.ts +3 -0
  12. package/dist/api/node/encoder.d.ts.map +1 -1
  13. package/dist/api/node/encoder.js +17 -14
  14. package/dist/api/node/encoder.js.map +1 -1
  15. package/dist/api/node/msgpack.d.ts.map +1 -1
  16. package/dist/api/node/msgpack.js +2 -3
  17. package/dist/api/node/msgpack.js.map +1 -1
  18. package/dist/api/node/node.generated.d.ts +3 -1
  19. package/dist/api/node/node.generated.d.ts.map +1 -1
  20. package/dist/api/node/node.generated.js +31 -0
  21. package/dist/api/node/node.generated.js.map +1 -1
  22. package/dist/api/node/node.infrastructure.d.ts +1 -1
  23. package/dist/api/node/node.infrastructure.d.ts.map +1 -1
  24. package/dist/api/node/wtf8.d.ts +2 -1
  25. package/dist/api/node/wtf8.d.ts.map +1 -1
  26. package/dist/api/node/wtf8.js +69 -0
  27. package/dist/api/node/wtf8.js.map +1 -1
  28. package/dist/api/options.d.ts +7 -7
  29. package/dist/api/options.d.ts.map +1 -1
  30. package/dist/api/proto.d.ts +6 -15
  31. package/dist/api/proto.d.ts.map +1 -1
  32. package/dist/api/proto.generated.d.ts +189 -147
  33. package/dist/api/proto.generated.d.ts.map +1 -1
  34. package/dist/api/proto.generated.js +2 -0
  35. package/dist/api/proto.generated.js.map +1 -1
  36. package/dist/api/proto.js +2 -3
  37. package/dist/api/proto.js.map +1 -1
  38. package/dist/api/sourceFileCache.js.map +1 -1
  39. package/dist/api/sync/api.d.ts +120 -53
  40. package/dist/api/sync/api.d.ts.map +1 -1
  41. package/dist/api/sync/api.js +255 -169
  42. package/dist/api/sync/api.js.map +1 -1
  43. package/dist/api/sync/types.d.ts +2 -2
  44. package/dist/api/sync/types.d.ts.map +1 -1
  45. package/dist/api/timing.d.ts +2 -2
  46. package/dist/api/timing.d.ts.map +1 -1
  47. package/dist/ast/ast.d.ts +1 -0
  48. package/dist/ast/ast.d.ts.map +1 -1
  49. package/dist/ast/factory.generated.d.ts +1 -0
  50. package/dist/ast/factory.generated.d.ts.map +1 -1
  51. package/dist/ast/factory.generated.js +2651 -1
  52. package/dist/ast/factory.generated.js.map +1 -1
  53. package/dist/ast/visitor.d.ts +2 -0
  54. package/dist/ast/visitor.d.ts.map +1 -1
  55. package/dist/ast/visitor.js +40 -0
  56. package/dist/ast/visitor.js.map +1 -1
  57. package/package.json +9 -9
@@ -3,12 +3,15 @@ import { ModuleDetectionKind } from "#enums/moduleDetectionKind";
3
3
  import { ModuleKind } from "#enums/moduleKind";
4
4
  import { ModuleResolutionKind } from "#enums/moduleResolutionKind";
5
5
  import { NewLineKind } from "#enums/newLineKind";
6
+ import { ScriptKind } from "#enums/scriptKind";
6
7
  import { ScriptTarget } from "#enums/scriptTarget";
8
+ import type { Path } from "../ast/index.ts";
7
9
  export { JsxEmit } from "#enums/jsxEmit";
8
10
  export { ModuleDetectionKind } from "#enums/moduleDetectionKind";
9
11
  export { ModuleKind } from "#enums/moduleKind";
10
12
  export { ModuleResolutionKind } from "#enums/moduleResolutionKind";
11
13
  export { NewLineKind } from "#enums/newLineKind";
14
+ export { ScriptKind } from "#enums/scriptKind";
12
15
  export { ScriptTarget } from "#enums/scriptTarget";
13
16
  export type APIMethod<TParams, TResult> = {
14
17
  params: TParams;
@@ -18,13 +21,15 @@ export interface APIMethodInfo {
18
21
  release: APIMethod<ReleaseParams, void>;
19
22
  batchRequests: APIMethod<BatchRequestsParams, BatchRequestsResponse>;
20
23
  initialize: APIMethod<null, InitializeResponse>;
21
- updateSnapshot: APIMethod<UpdateSnapshotParams, UpdateSnapshotResponse>;
22
- updateTemporarySnapshot: APIMethod<UpdateTemporarySnapshotParams, UpdateSnapshotResponse>;
23
- createProgram: APIMethod<CreateProgramParams, CreateProgramResponse>;
24
+ createSnapshot: APIMethod<CreateSnapshotParams, CreateSnapshotResponse>;
25
+ updateSnapshot: APIMethod<UpdateSnapshotParams, CreateSnapshotResponse>;
26
+ getCurrentLanguageServerSnapshot: APIMethod<GetCurrentLanguageServerSnapshotParams, CreateSnapshotResponse>;
24
27
  parseCommandLine: APIMethod<ParseCommandLineParams, ConfigFileResponse>;
25
28
  readConfigFile: APIMethod<ReadConfigFileParams, ReadConfigFileResponse>;
26
29
  parseJsonConfigFileContent: APIMethod<ParseJsonConfigFileContentParams, ConfigFileResponse>;
27
30
  parseConfigFile: APIMethod<ParseConfigFileParams, ConfigFileResponse>;
31
+ createSourceFile: APIMethod<CreateSourceFileParams, SourceFileResponse>;
32
+ createSourceFileFromFile: APIMethod<CreateSourceFileFromFileParams, SourceFileResponse>;
28
33
  transpileModule: APIMethod<TranspileParams, TranspileOutputResponse>;
29
34
  transpileModuleFromFile: APIMethod<TranspileFromFileParams, TranspileOutputResponse>;
30
35
  transpileDeclaration: APIMethod<TranspileParams, TranspileOutputResponse>;
@@ -174,6 +179,17 @@ export interface APIMethodInfo {
174
179
  export type DocumentIdentifier = string | {
175
180
  uri: string;
176
181
  };
182
+ export type EnsurePrograms = true | readonly ProjectId[];
183
+ export type InferredProjectId = string & {
184
+ __inferredProjectIdBrand: any;
185
+ };
186
+ export type ConfiguredProjectId = Path & {
187
+ __configuredProjectIdBrand: any;
188
+ };
189
+ export type SyntheticProjectId = string & {
190
+ __syntheticProjectIdBrand: any;
191
+ };
192
+ export type ProjectId = InferredProjectId | ConfiguredProjectId | SyntheticProjectId;
177
193
  /** ReleaseParams are the parameters for the release method. */
178
194
  export interface ReleaseParams {
179
195
  snapshot: number;
@@ -194,82 +210,38 @@ export interface InitializeResponse {
194
210
  /** CurrentDirectory is the server's current working directory. */
195
211
  currentDirectory: string;
196
212
  }
197
- /**
198
- * UpdateSnapshotParams are the parameters for creating a new snapshot.
199
- * All fields are optional. With no fields set, the server adopts the latest LSP state.
200
- */
201
- export interface UpdateSnapshotParams {
202
- /**
203
- * Snapshot, when set, requires this to be the latest active snapshot and layers
204
- * FileSystem over that snapshot's filesystem. Used by Snapshot.update.
205
- */
206
- snapshot?: number | undefined;
207
- /**
208
- * OpenProjects lists tsconfig.json files to open/load in the new snapshot.
209
- * Opens are ref-counted and persist across snapshots until closed.
210
- */
211
- openProjects?: readonly DocumentIdentifier[] | undefined;
212
- /**
213
- * CloseProjects lists tsconfig.json files to release in the new snapshot.
214
- * A project is only unloaded once every API client that opened it closes it.
215
- */
216
- closeProjects?: readonly DocumentIdentifier[] | undefined;
217
- /** FileChanges describes file system changes since the last snapshot. */
218
- fileChanges?: APIFileChanges | undefined;
213
+ /** CreateSnapshotParams are the parameters for creating a new independent snapshot. */
214
+ export interface CreateSnapshotParams extends SnapshotRequestChangesParams {
215
+ /** FileNotifications describes host file system changes to invalidate while creating the snapshot. */
216
+ fileNotifications?: FileNotifications | undefined;
219
217
  /**
220
218
  * FileSystem supplies file contents and directory listings for the new snapshot.
221
219
  * A full filesystem is canonical and total. A filesystem layer is checked
222
- * before falling back to the host filesystem.
220
+ * before falling back to the base snapshot or host filesystem.
223
221
  */
224
222
  fileSystem?: RequestFileSystem | undefined;
225
- /**
226
- * OpenFiles lists files to keep open for the API client, mirroring LSP's
227
- * textDocument/didOpen. For each file, ancestor directories are searched for a
228
- * tsconfig that contains it; if found, that configured project is loaded and
229
- * becomes the file's default project. Otherwise the file is loaded into the
230
- * inferred project (e.g. a node_modules d.ts not in any project's import graph).
231
- * Opens persist across snapshots until the file is closed.
232
- */
233
- openFiles?: readonly DocumentIdentifier[] | undefined;
234
- /**
235
- * CloseFiles lists files to release in the new snapshot. A file is only fully
236
- * closed once every API client that opened it closes it.
237
- */
238
- closeFiles?: readonly DocumentIdentifier[] | undefined;
239
223
  }
240
- /** UpdateSnapshotResponse is returned by updateSnapshot. */
241
- export interface UpdateSnapshotResponse {
224
+ /** CreateSnapshotResponse is returned by createSnapshot. */
225
+ export interface CreateSnapshotResponse {
242
226
  /** Snapshot is the handle for the newly created snapshot. */
243
227
  snapshot: number;
244
- /** Projects is the list of projects in the snapshot. */
245
- projects: ProjectResponse[];
246
228
  /**
247
- * Changes describes source file differences from the previous snapshot.
248
- * Nil for the first snapshot in a session.
229
+ * Projects contains all projects when no response base was supplied, or only
230
+ * projects added or replaced relative to that base.
249
231
  */
232
+ projects: ProjectResponse[];
233
+ /** Changes describes source file differences from the response base. */
250
234
  changes?: SnapshotChanges | undefined;
235
+ /** Operation describes results correlated with the request that produced the snapshot. */
236
+ operation: SnapshotOperationResponse;
251
237
  }
252
- /**
253
- * UpdateTemporarySnapshotParams are the parameters for creating a temporary
254
- * snapshot that overrides a single file's content.
255
- */
256
- export interface UpdateTemporarySnapshotParams {
257
- /** Snapshot is the current client snapshot on which to layer the temporary update. */
238
+ export interface UpdateSnapshotParams {
258
239
  snapshot: number;
259
- /** File identifies the file whose content is temporarily overridden. */
260
- file: DocumentIdentifier;
261
- /** NewText is the temporary content for the file. */
262
- newText: string;
240
+ changes?: CreateSnapshotParams | undefined;
263
241
  }
264
- export interface CreateProgramParams {
265
- rootFiles: readonly DocumentIdentifier[] | null;
266
- createProgramOptions: CreateProgramOptions;
267
- oldProgram?: CreateProgramOldProgramParams | undefined;
268
- fileChanges?: APIFileChanges | undefined;
269
- }
270
- export interface CreateProgramResponse {
271
- snapshot: number;
272
- project: ProjectResponse | null;
242
+ export interface GetCurrentLanguageServerSnapshotParams {
243
+ baseSnapshot?: number | undefined;
244
+ changes?: LanguageServerSnapshotChanges | undefined;
273
245
  }
274
246
  export interface ParseCommandLineParams {
275
247
  commandLine: readonly string[] | null;
@@ -298,6 +270,23 @@ export interface ParseJsonConfigFileContentParams {
298
270
  export interface ParseConfigFileParams {
299
271
  file: DocumentIdentifier;
300
272
  }
273
+ export interface CreateSourceFileParams {
274
+ fileName: string;
275
+ sourceText: string;
276
+ options: CreateSourceFileOptions;
277
+ }
278
+ /**
279
+ * SourceFileResponse contains the binary-encoded AST data for a source file.
280
+ * The Data field is base64-encoded binary data in the encoder's format.
281
+ */
282
+ export interface SourceFileResponse {
283
+ /** Data is the base64-encoded binary AST data in the encoder's format. */
284
+ data: string;
285
+ }
286
+ export interface CreateSourceFileFromFileParams {
287
+ fileName: string;
288
+ options: CreateSourceFileOptions;
289
+ }
301
290
  export interface TranspileParams {
302
291
  input: string;
303
292
  options: TranspileOptions;
@@ -316,9 +305,10 @@ export interface GetDefaultProjectForFileParams {
316
305
  file: DocumentIdentifier;
317
306
  }
318
307
  export interface ProjectResponse {
319
- id: string;
308
+ id: ProjectId;
320
309
  configFileName: string;
321
310
  currentDirectory: string;
311
+ dirty: boolean;
322
312
  parsedCommandLine: ConfigFileResponse;
323
313
  /** @deprecated Use parsedCommandLine.fileNames. */
324
314
  rootFiles: string[];
@@ -327,7 +317,7 @@ export interface ProjectResponse {
327
317
  }
328
318
  export interface GetSymbolAtPositionParams {
329
319
  snapshot: number;
330
- project: string;
320
+ project: ProjectId;
331
321
  file: DocumentIdentifier;
332
322
  position: number;
333
323
  }
@@ -337,7 +327,7 @@ export interface SymbolResponse {
337
327
  * Project is the project in which the symbol was first observed. It is the
338
328
  * default project for follow-up lookups whose results can vary by project.
339
329
  */
340
- project: string;
330
+ project: ProjectId;
341
331
  name: string;
342
332
  flags: number;
343
333
  checkFlags: number;
@@ -348,33 +338,33 @@ export interface SymbolResponse {
348
338
  }
349
339
  export interface GetSymbolsAtPositionsParams {
350
340
  snapshot: number;
351
- project: string;
341
+ project: ProjectId;
352
342
  file: DocumentIdentifier;
353
343
  positions: readonly number[] | null;
354
344
  }
355
345
  export interface GetSymbolAtLocationParams {
356
346
  snapshot: number;
357
- project: string;
347
+ project: ProjectId;
358
348
  location: string;
359
349
  }
360
350
  export interface GetSymbolsAtLocationsParams {
361
351
  snapshot: number;
362
- project: string;
352
+ project: ProjectId;
363
353
  locations: readonly string[] | null;
364
354
  }
365
355
  export interface GetSymbolOfSourceFileParams {
366
356
  snapshot: number;
367
- project: string;
357
+ project: ProjectId;
368
358
  file: DocumentIdentifier;
369
359
  }
370
360
  export interface GetSymbolsOfSourceFilesParams {
371
361
  snapshot: number;
372
- project: string;
362
+ project: ProjectId;
373
363
  files: readonly DocumentIdentifier[] | null;
374
364
  }
375
365
  export interface GetTypeOfSymbolParams {
376
366
  snapshot: number;
377
- project: string;
367
+ project: ProjectId;
378
368
  symbol: number;
379
369
  }
380
370
  export interface TypeResponse {
@@ -426,25 +416,17 @@ export interface TypeResponse {
426
416
  }
427
417
  export interface GetTypesOfSymbolsParams {
428
418
  snapshot: number;
429
- project: string;
419
+ project: ProjectId;
430
420
  symbols: readonly number[] | null;
431
421
  }
432
422
  export interface GetSourceFileParams {
433
423
  snapshot: number;
434
- project: string;
424
+ project: ProjectId;
435
425
  file: DocumentIdentifier;
436
426
  }
437
- /**
438
- * SourceFileResponse contains the binary-encoded AST data for a source file.
439
- * The Data field is base64-encoded binary data in the encoder's format.
440
- */
441
- export interface SourceFileResponse {
442
- /** Data is the base64-encoded binary AST data in the encoder's format. */
443
- data: string;
444
- }
445
427
  export interface GetSourceFileNamesParams {
446
428
  snapshot: number;
447
- project: string;
429
+ project: ProjectId;
448
430
  }
449
431
  /** SourceFileMetadata carries program-stored metadata about a single source file. */
450
432
  export interface SourceFileMetadata {
@@ -456,19 +438,19 @@ export interface SourceFileMetadata {
456
438
  }
457
439
  export interface GetModeForUsageLocationParams {
458
440
  snapshot: number;
459
- project: string;
441
+ project: ProjectId;
460
442
  file: DocumentIdentifier;
461
443
  usage: string;
462
444
  }
463
445
  export interface GetModeForResolutionAtIndexParams {
464
446
  snapshot: number;
465
- project: string;
447
+ project: ProjectId;
466
448
  file: DocumentIdentifier;
467
449
  index: number;
468
450
  }
469
451
  export interface GetResolvedModuleParams {
470
452
  snapshot: number;
471
- project: string;
453
+ project: ProjectId;
472
454
  file: DocumentIdentifier;
473
455
  moduleName: string;
474
456
  mode: ModuleKind;
@@ -485,13 +467,13 @@ export interface ResolvedModule {
485
467
  }
486
468
  export interface GetResolvedModuleFromModuleSpecifierParams {
487
469
  snapshot: number;
488
- project: string;
470
+ project: ProjectId;
489
471
  moduleSpecifier: string;
490
472
  sourceFile?: DocumentIdentifier | undefined;
491
473
  }
492
474
  export interface GetResolvedTypeReferenceDirectiveParams {
493
475
  snapshot: number;
494
- project: string;
476
+ project: ProjectId;
495
477
  file: DocumentIdentifier;
496
478
  typeDirectiveName: string;
497
479
  mode: ModuleKind;
@@ -505,7 +487,7 @@ export interface ResolvedTypeReferenceDirective {
505
487
  }
506
488
  export interface GetResolvedTypeReferenceDirectiveFromReferenceParams {
507
489
  snapshot: number;
508
- project: string;
490
+ project: ProjectId;
509
491
  sourceFile: DocumentIdentifier;
510
492
  typeDirectiveName: string;
511
493
  resolutionMode: ModuleKind;
@@ -513,11 +495,11 @@ export interface GetResolvedTypeReferenceDirectiveFromReferenceParams {
513
495
  /** GetProjectDiagnosticsParams are parameters for project-wide diagnostic methods. */
514
496
  export interface GetProjectDiagnosticsParams {
515
497
  snapshot: number;
516
- project: string;
498
+ project: ProjectId;
517
499
  }
518
500
  export interface ResolveNameParams {
519
501
  snapshot: number;
520
- project: string;
502
+ project: ProjectId;
521
503
  name: string;
522
504
  /** Optional: node handle for location context */
523
505
  location?: string | undefined;
@@ -536,7 +518,7 @@ export interface ResolveNameParams {
536
518
  */
537
519
  export interface GetSymbolsInScopeParams {
538
520
  snapshot: number;
539
- project: string;
521
+ project: ProjectId;
540
522
  /** Optional: node handle for location context */
541
523
  location?: string | undefined;
542
524
  /** Optional: file for location context (alternative to Location) */
@@ -548,7 +530,7 @@ export interface GetSymbolsInScopeParams {
548
530
  }
549
531
  export interface GetSignaturesOfTypeParams {
550
532
  snapshot: number;
551
- project: string;
533
+ project: ProjectId;
552
534
  type: number;
553
535
  kind: number;
554
536
  }
@@ -563,116 +545,116 @@ export interface SignatureResponse {
563
545
  }
564
546
  export interface GetResolvedSignatureParams {
565
547
  snapshot: number;
566
- project: string;
548
+ project: ProjectId;
567
549
  location: string;
568
550
  }
569
551
  export interface GetTypeAtLocationParams {
570
552
  snapshot: number;
571
- project: string;
553
+ project: ProjectId;
572
554
  location: string;
573
555
  }
574
556
  export interface GetTypeAtLocationsParams {
575
557
  snapshot: number;
576
- project: string;
558
+ project: ProjectId;
577
559
  locations: readonly string[] | null;
578
560
  }
579
561
  export interface GetTypeAtPositionParams {
580
562
  snapshot: number;
581
- project: string;
563
+ project: ProjectId;
582
564
  file: DocumentIdentifier;
583
565
  position: number;
584
566
  }
585
567
  export interface GetTypesAtPositionsParams {
586
568
  snapshot: number;
587
- project: string;
569
+ project: ProjectId;
588
570
  file: DocumentIdentifier;
589
571
  positions: readonly number[] | null;
590
572
  }
591
573
  /** GetSymbolPropertyParams is used for all symbol sub-property endpoints. */
592
574
  export interface GetSymbolPropertyParams {
593
575
  snapshot: number;
594
- project: string;
576
+ project: ProjectId;
595
577
  objectId: number;
596
578
  }
597
579
  /** GetTypePropertyParams is used for all type sub-property endpoints. */
598
580
  export interface GetTypePropertyParams {
599
581
  snapshot: number;
600
- project: string;
582
+ project: ProjectId;
601
583
  objectId: number;
602
584
  }
603
585
  /** GetSignaturePropertyParams is used for all signature sub-property endpoints. */
604
586
  export interface GetSignaturePropertyParams {
605
587
  snapshot: number;
606
- project: string;
588
+ project: ProjectId;
607
589
  objectId: number;
608
590
  }
609
591
  /** GetContextualTypeParams returns the contextual type for a node. */
610
592
  export interface GetContextualTypeParams {
611
593
  snapshot: number;
612
- project: string;
594
+ project: ProjectId;
613
595
  location: string;
614
596
  }
615
597
  export interface GetContextualTypeForArgumentParams {
616
598
  snapshot: number;
617
- project: string;
599
+ project: ProjectId;
618
600
  location: string;
619
601
  index: number;
620
602
  }
621
603
  /** CheckerTypeParams are parameters for checker methods that operate on a type. */
622
604
  export interface CheckerTypeParams {
623
605
  snapshot: number;
624
- project: string;
606
+ project: ProjectId;
625
607
  type: number;
626
608
  }
627
609
  /** GetBaseTypeOfLiteralTypeParams returns the base type of a literal type. */
628
610
  export interface GetBaseTypeOfLiteralTypeParams {
629
611
  snapshot: number;
630
- project: string;
612
+ project: ProjectId;
631
613
  type: number;
632
614
  }
633
615
  /** GetTypeFromTypeNodeParams are the parameters for the getTypeFromTypeNode method. */
634
616
  export interface GetTypeFromTypeNodeParams {
635
617
  snapshot: number;
636
- project: string;
618
+ project: ProjectId;
637
619
  location: string;
638
620
  }
639
621
  /** GetWidenedTypeParams are the parameters for the getWidenedType method. */
640
622
  export interface GetWidenedTypeParams {
641
623
  snapshot: number;
642
- project: string;
624
+ project: ProjectId;
643
625
  type: number;
644
626
  }
645
627
  /** GetParameterTypeParams are the parameters for the getParameterType method. */
646
628
  export interface GetParameterTypeParams {
647
629
  snapshot: number;
648
- project: string;
630
+ project: ProjectId;
649
631
  signature: number;
650
632
  index: number;
651
633
  }
652
634
  /** IsArrayLikeTypeParams checks whether a type is array-like. */
653
635
  export interface IsArrayLikeTypeParams {
654
636
  snapshot: number;
655
- project: string;
637
+ project: ProjectId;
656
638
  type: number;
657
639
  }
658
640
  /** IsTypeAssignableToParams checks assignability between two types. */
659
641
  export interface IsTypeAssignableToParams {
660
642
  snapshot: number;
661
- project: string;
643
+ project: ProjectId;
662
644
  source: number;
663
645
  target: number;
664
646
  }
665
647
  /** GetTypeOfSymbolAtLocationParams returns the narrowed type of a symbol at a specific location. */
666
648
  export interface GetTypeOfSymbolAtLocationParams {
667
649
  snapshot: number;
668
- project: string;
650
+ project: ProjectId;
669
651
  symbol: number;
670
652
  location: string;
671
653
  }
672
654
  /** TypeToTypeNodeParams are the parameters for the typeToTypeNode method. */
673
655
  export interface TypeToTypeNodeParams {
674
656
  snapshot: number;
675
- project: string;
657
+ project: ProjectId;
676
658
  type: number;
677
659
  location?: string | undefined;
678
660
  flags?: number | undefined;
@@ -680,7 +662,7 @@ export interface TypeToTypeNodeParams {
680
662
  /** SignatureToSignatureDeclarationParams are the parameters for the signatureToSignatureDeclaration method. */
681
663
  export interface SignatureToSignatureDeclarationParams {
682
664
  snapshot: number;
683
- project: string;
665
+ project: ProjectId;
684
666
  signature: number;
685
667
  kind: number;
686
668
  location?: string | undefined;
@@ -689,7 +671,7 @@ export interface SignatureToSignatureDeclarationParams {
689
671
  /** CheckerSignatureParams are parameters for checker methods that operate on a signature. */
690
672
  export interface CheckerSignatureParams {
691
673
  snapshot: number;
692
- project: string;
674
+ project: ProjectId;
693
675
  signature: number;
694
676
  }
695
677
  /** TypePredicateResponse is the response for getTypePredicateOfSignature. */
@@ -702,13 +684,13 @@ export interface TypePredicateResponse {
702
684
  /** GetPropertyOfTypeParams are parameters for getPropertyOfType (a named property of a type). */
703
685
  export interface GetPropertyOfTypeParams {
704
686
  snapshot: number;
705
- project: string;
687
+ project: ProjectId;
706
688
  type: number;
707
689
  name: string;
708
690
  }
709
691
  export interface GetIndexInfoOfTypeParams {
710
692
  snapshot: number;
711
- project: string;
693
+ project: ProjectId;
712
694
  type: number;
713
695
  kind: number;
714
696
  }
@@ -721,7 +703,7 @@ export interface IndexInfoResponse {
721
703
  }
722
704
  export interface GetImportAdderEditsParams {
723
705
  snapshot: number;
724
- project: string;
706
+ project: ProjectId;
725
707
  file: DocumentIdentifier;
726
708
  actions: readonly ImportAdderAction[] | null;
727
709
  }
@@ -733,7 +715,7 @@ export interface TextEdit {
733
715
  /** CheckerNodeParams are parameters for checker methods that operate on a node location. */
734
716
  export interface CheckerNodeParams {
735
717
  snapshot: number;
736
- project: string;
718
+ project: ProjectId;
737
719
  location: string;
738
720
  }
739
721
  export interface ConstantValueResponse {
@@ -743,13 +725,13 @@ export interface ConstantValueResponse {
743
725
  /** CheckerSymbolParams are parameters for checker methods that operate on a symbol. */
744
726
  export interface CheckerSymbolParams {
745
727
  snapshot: number;
746
- project: string;
728
+ project: ProjectId;
747
729
  symbol: number;
748
730
  }
749
731
  /** GetMemberInModuleExportsParams are parameters for getMemberInModuleExports. */
750
732
  export interface GetMemberInModuleExportsParams {
751
733
  snapshot: number;
752
- project: string;
734
+ project: ProjectId;
753
735
  symbol: number;
754
736
  name: string;
755
737
  }
@@ -764,14 +746,14 @@ export interface JSDocTagInfo {
764
746
  /** GetReferencesToSymbolInFileParams are the parameters for the getReferencesToSymbolInFile method. */
765
747
  export interface GetReferencesToSymbolInFileParams {
766
748
  snapshot: number;
767
- project: string;
749
+ project: ProjectId;
768
750
  file: DocumentIdentifier;
769
751
  symbol: number;
770
752
  }
771
753
  /** GetReferencedSymbolsForNodeParams are the parameters for the getReferencedSymbolsForNode method. */
772
754
  export interface GetReferencedSymbolsForNodeParams {
773
755
  snapshot: number;
774
- project: string;
756
+ project: ProjectId;
775
757
  node: string;
776
758
  position: number;
777
759
  }
@@ -784,7 +766,7 @@ export interface ReferencedSymbolEntry {
784
766
  /** GetSignatureUsagesParams are the parameters for the getSignatureUsages method. */
785
767
  export interface GetSignatureUsagesParams {
786
768
  snapshot: number;
787
- project: string;
769
+ project: ProjectId;
788
770
  signatureDecl: string;
789
771
  }
790
772
  /** SignatureUsageResponse represents a single usage of a signature as a name-call pair. */
@@ -795,7 +777,7 @@ export interface SignatureUsageResponse {
795
777
  /** GetCompletionsAtPositionParams are the parameters for the getCompletionsAtPosition method. */
796
778
  export interface GetCompletionsAtPositionParams {
797
779
  snapshot: number;
798
- project: string;
780
+ project: ProjectId;
799
781
  file: DocumentIdentifier;
800
782
  position: number;
801
783
  triggerCharacter?: string | undefined;
@@ -809,7 +791,7 @@ export interface CompletionInfoResponse {
809
791
  /** GetDiagnosticsParams are parameters for per-file diagnostic methods. */
810
792
  export interface GetDiagnosticsParams {
811
793
  snapshot: number;
812
- project: string;
794
+ project: ProjectId;
813
795
  files?: readonly DocumentIdentifier[] | undefined;
814
796
  }
815
797
  /** DiagnosticResponse is the API response for a single diagnostic. */
@@ -854,7 +836,7 @@ export interface PrintNodeParams {
854
836
  /** FormatNodeForInsertionParams are the parameters for the formatNodeForInsertion method. */
855
837
  export interface FormatNodeForInsertionParams {
856
838
  snapshot: number;
857
- project: string;
839
+ project: ProjectId;
858
840
  /** target file where the node will be inserted */
859
841
  file: DocumentIdentifier;
860
842
  /** UTF-16 code-unit offset of the insertion position in the target file */
@@ -864,7 +846,7 @@ export interface FormatNodeForInsertionParams {
864
846
  }
865
847
  export interface EmitParams {
866
848
  snapshot: number;
867
- project: string;
849
+ project: ProjectId;
868
850
  emitOnly?: number | undefined;
869
851
  }
870
852
  export interface EmitResponse {
@@ -884,13 +866,13 @@ export interface EmitOutputResponse {
884
866
  }
885
867
  export interface SelectedFilesEmitParams {
886
868
  snapshot: number;
887
- project: string;
869
+ project: ProjectId;
888
870
  files: readonly DocumentIdentifier[] | null;
889
871
  }
890
872
  /** GetIntrinsicTypeParams is used for intrinsic type getters (anyType, stringType, etc.). */
891
873
  export interface GetIntrinsicTypeParams {
892
874
  snapshot: number;
893
- project: string;
875
+ project: ProjectId;
894
876
  }
895
877
  /**
896
878
  * WellKnownSymbolsResponse carries the handle ids of the per-checker singleton
@@ -917,20 +899,58 @@ export interface ProfileResult {
917
899
  file: string;
918
900
  }
919
901
  export interface BatchRequest {
920
- method: "batchRequests" | "createProgram" | "emit" | "emitToString" | "formatNodeForInsertion" | "getAliasSymbolOfType" | "getAliasTypeArgumentsOfType" | "getAliasedSymbol" | "getAnyType" | "getApparentPropertiesOfType" | "getApparentType" | "getAwaitedType" | "getBaseConstraintOfType" | "getBaseTypeOfLiteralType" | "getBaseTypeOfType" | "getBaseTypes" | "getBigIntType" | "getBindDiagnostics" | "getBooleanType" | "getCheckTypeOfType" | "getCompletionsAtPosition" | "getConfigFileNames" | "getConfigFileParsingDiagnostics" | "getConfigSourceFile" | "getConstantValue" | "getConstraintOfType" | "getConstraintOfTypeParameter" | "getContextualType" | "getContextualTypeForArgument" | "getDeclarationDiagnostics" | "getDeclarationEmit" | "getDeclaredTypeOfSymbol" | "getDefaultFromTypeParameter" | "getDefaultProjectForFile" | "getDocumentationComment" | "getESSymbolType" | "getExportSpecifierLocalTargetSymbol" | "getExportSymbolOfSymbol" | "getExportSymbolOfSymbolForChecker" | "getExportsOfModule" | "getExportsOfSymbol" | "getExtendsTypeOfType" | "getFalseTypeOfConditionalType" | "getFreshTypeOfType" | "getFullyQualifiedName" | "getGlobalDiagnostics" | "getImmediateAliasedSymbol" | "getImportAdderEdits" | "getIndexInfoOfType" | "getIndexInfosOfType" | "getIndexTypeOfType" | "getIndexTypeOfTypeByKind" | "getJavaScriptEmit" | "getJsDocTags" | "getLocalTypeParametersOfType" | "getMemberInModuleExports" | "getMembersOfSymbol" | "getModeForResolutionAtIndex" | "getModeForUsageLocation" | "getNeverType" | "getNonMissingTypeOfSymbol" | "getNonNullableType" | "getNonPrimitiveType" | "getNullType" | "getNumberType" | "getObjectTypeOfType" | "getOuterTypeParametersOfType" | "getParameterType" | "getParametersOfSignature" | "getParentOfSymbol" | "getProgramDiagnostics" | "getPropertiesOfType" | "getPropertyOfType" | "getReducedType" | "getReferencedSymbolsForNode" | "getReferencesToSymbolInFile" | "getRegularTypeOfType" | "getResolvedModule" | "getResolvedModuleFromModuleSpecifier" | "getResolvedSignature" | "getResolvedTypeReferenceDirective" | "getResolvedTypeReferenceDirectiveFromTypeReferenceDirective" | "getRestTypeOfSignature" | "getReturnTypeOfSignature" | "getSemanticDiagnostics" | "getShorthandAssignmentValueSymbol" | "getSignatureFromDeclaration" | "getSignatureUsages" | "getSignaturesOfType" | "getSourceFile" | "getSourceFileMetadata" | "getSourceFileNames" | "getStringType" | "getSuggestionDiagnostics" | "getSymbolAtLocation" | "getSymbolAtPosition" | "getSymbolOfSourceFile" | "getSymbolOfType" | "getSymbolsAtLocations" | "getSymbolsAtPositions" | "getSymbolsInScope" | "getSymbolsOfSourceFiles" | "getSyntacticDiagnostics" | "getTargetOfSignature" | "getTargetOfType" | "getTargetSymbol" | "getThisParameterOfSignature" | "getThisTypeOfType" | "getTrueTypeOfConditionalType" | "getTypeArguments" | "getTypeAtLocation" | "getTypeAtLocations" | "getTypeAtPosition" | "getTypeFromTypeNode" | "getTypeOfPropertyOfType" | "getTypeOfSymbol" | "getTypeOfSymbolAtLocation" | "getTypeParameterAtPosition" | "getTypeParametersOfSignature" | "getTypeParametersOfType" | "getTypePredicateOfSignature" | "getTypesAtPositions" | "getTypesOfSymbols" | "getTypesOfType" | "getUndefinedType" | "getUnknownType" | "getVoidType" | "getWellKnownSignatures" | "getWellKnownSymbols" | "getWidenedType" | "initialize" | "isArrayLikeType" | "isArrayType" | "isContextSensitive" | "isReadonlySymbol" | "isTypeAssignableTo" | "parseCommandLine" | "parseConfigFile" | "parseJsonConfigFileContent" | "printNode" | "readConfigFile" | "release" | "resolveName" | "saveHeapProfile" | "signatureToSignatureDeclaration" | "startCPUProfile" | "stopCPUProfile" | "transpileDeclaration" | "transpileDeclarationFromFile" | "transpileModule" | "transpileModuleFromFile" | "typeToString" | "typeToTypeNode" | "updateSnapshot" | "updateTemporarySnapshot";
902
+ method: "batchRequests" | "createSnapshot" | "createSourceFile" | "createSourceFileFromFile" | "emit" | "emitToString" | "formatNodeForInsertion" | "getAliasSymbolOfType" | "getAliasTypeArgumentsOfType" | "getAliasedSymbol" | "getAnyType" | "getApparentPropertiesOfType" | "getApparentType" | "getAwaitedType" | "getBaseConstraintOfType" | "getBaseTypeOfLiteralType" | "getBaseTypeOfType" | "getBaseTypes" | "getBigIntType" | "getBindDiagnostics" | "getBooleanType" | "getCheckTypeOfType" | "getCompletionsAtPosition" | "getConfigFileNames" | "getConfigFileParsingDiagnostics" | "getConfigSourceFile" | "getConstantValue" | "getConstraintOfType" | "getConstraintOfTypeParameter" | "getContextualType" | "getContextualTypeForArgument" | "getCurrentLanguageServerSnapshot" | "getDeclarationDiagnostics" | "getDeclarationEmit" | "getDeclaredTypeOfSymbol" | "getDefaultFromTypeParameter" | "getDefaultProjectForFile" | "getDocumentationComment" | "getESSymbolType" | "getExportSpecifierLocalTargetSymbol" | "getExportSymbolOfSymbol" | "getExportSymbolOfSymbolForChecker" | "getExportsOfModule" | "getExportsOfSymbol" | "getExtendsTypeOfType" | "getFalseTypeOfConditionalType" | "getFreshTypeOfType" | "getFullyQualifiedName" | "getGlobalDiagnostics" | "getImmediateAliasedSymbol" | "getImportAdderEdits" | "getIndexInfoOfType" | "getIndexInfosOfType" | "getIndexTypeOfType" | "getIndexTypeOfTypeByKind" | "getJavaScriptEmit" | "getJsDocTags" | "getLocalTypeParametersOfType" | "getMemberInModuleExports" | "getMembersOfSymbol" | "getModeForResolutionAtIndex" | "getModeForUsageLocation" | "getNeverType" | "getNonMissingTypeOfSymbol" | "getNonNullableType" | "getNonPrimitiveType" | "getNullType" | "getNumberType" | "getObjectTypeOfType" | "getOuterTypeParametersOfType" | "getParameterType" | "getParametersOfSignature" | "getParentOfSymbol" | "getProgramDiagnostics" | "getPropertiesOfType" | "getPropertyOfType" | "getReducedType" | "getReferencedSymbolsForNode" | "getReferencesToSymbolInFile" | "getRegularTypeOfType" | "getResolvedModule" | "getResolvedModuleFromModuleSpecifier" | "getResolvedSignature" | "getResolvedTypeReferenceDirective" | "getResolvedTypeReferenceDirectiveFromTypeReferenceDirective" | "getRestTypeOfSignature" | "getReturnTypeOfSignature" | "getSemanticDiagnostics" | "getShorthandAssignmentValueSymbol" | "getSignatureFromDeclaration" | "getSignatureUsages" | "getSignaturesOfType" | "getSourceFile" | "getSourceFileMetadata" | "getSourceFileNames" | "getStringType" | "getSuggestionDiagnostics" | "getSymbolAtLocation" | "getSymbolAtPosition" | "getSymbolOfSourceFile" | "getSymbolOfType" | "getSymbolsAtLocations" | "getSymbolsAtPositions" | "getSymbolsInScope" | "getSymbolsOfSourceFiles" | "getSyntacticDiagnostics" | "getTargetOfSignature" | "getTargetOfType" | "getTargetSymbol" | "getThisParameterOfSignature" | "getThisTypeOfType" | "getTrueTypeOfConditionalType" | "getTypeArguments" | "getTypeAtLocation" | "getTypeAtLocations" | "getTypeAtPosition" | "getTypeFromTypeNode" | "getTypeOfPropertyOfType" | "getTypeOfSymbol" | "getTypeOfSymbolAtLocation" | "getTypeParameterAtPosition" | "getTypeParametersOfSignature" | "getTypeParametersOfType" | "getTypePredicateOfSignature" | "getTypesAtPositions" | "getTypesOfSymbols" | "getTypesOfType" | "getUndefinedType" | "getUnknownType" | "getVoidType" | "getWellKnownSignatures" | "getWellKnownSymbols" | "getWidenedType" | "initialize" | "isArrayLikeType" | "isArrayType" | "isContextSensitive" | "isReadonlySymbol" | "isTypeAssignableTo" | "parseCommandLine" | "parseConfigFile" | "parseJsonConfigFileContent" | "printNode" | "readConfigFile" | "release" | "resolveName" | "saveHeapProfile" | "signatureToSignatureDeclaration" | "startCPUProfile" | "stopCPUProfile" | "transpileDeclaration" | "transpileDeclarationFromFile" | "transpileModule" | "transpileModuleFromFile" | "typeToString" | "typeToTypeNode" | "updateSnapshot";
921
903
  params?: unknown | undefined;
922
904
  }
923
905
  export interface BatchResponse {
924
- method: "batchRequests" | "createProgram" | "emit" | "emitToString" | "formatNodeForInsertion" | "getAliasSymbolOfType" | "getAliasTypeArgumentsOfType" | "getAliasedSymbol" | "getAnyType" | "getApparentPropertiesOfType" | "getApparentType" | "getAwaitedType" | "getBaseConstraintOfType" | "getBaseTypeOfLiteralType" | "getBaseTypeOfType" | "getBaseTypes" | "getBigIntType" | "getBindDiagnostics" | "getBooleanType" | "getCheckTypeOfType" | "getCompletionsAtPosition" | "getConfigFileNames" | "getConfigFileParsingDiagnostics" | "getConfigSourceFile" | "getConstantValue" | "getConstraintOfType" | "getConstraintOfTypeParameter" | "getContextualType" | "getContextualTypeForArgument" | "getDeclarationDiagnostics" | "getDeclarationEmit" | "getDeclaredTypeOfSymbol" | "getDefaultFromTypeParameter" | "getDefaultProjectForFile" | "getDocumentationComment" | "getESSymbolType" | "getExportSpecifierLocalTargetSymbol" | "getExportSymbolOfSymbol" | "getExportSymbolOfSymbolForChecker" | "getExportsOfModule" | "getExportsOfSymbol" | "getExtendsTypeOfType" | "getFalseTypeOfConditionalType" | "getFreshTypeOfType" | "getFullyQualifiedName" | "getGlobalDiagnostics" | "getImmediateAliasedSymbol" | "getImportAdderEdits" | "getIndexInfoOfType" | "getIndexInfosOfType" | "getIndexTypeOfType" | "getIndexTypeOfTypeByKind" | "getJavaScriptEmit" | "getJsDocTags" | "getLocalTypeParametersOfType" | "getMemberInModuleExports" | "getMembersOfSymbol" | "getModeForResolutionAtIndex" | "getModeForUsageLocation" | "getNeverType" | "getNonMissingTypeOfSymbol" | "getNonNullableType" | "getNonPrimitiveType" | "getNullType" | "getNumberType" | "getObjectTypeOfType" | "getOuterTypeParametersOfType" | "getParameterType" | "getParametersOfSignature" | "getParentOfSymbol" | "getProgramDiagnostics" | "getPropertiesOfType" | "getPropertyOfType" | "getReducedType" | "getReferencedSymbolsForNode" | "getReferencesToSymbolInFile" | "getRegularTypeOfType" | "getResolvedModule" | "getResolvedModuleFromModuleSpecifier" | "getResolvedSignature" | "getResolvedTypeReferenceDirective" | "getResolvedTypeReferenceDirectiveFromTypeReferenceDirective" | "getRestTypeOfSignature" | "getReturnTypeOfSignature" | "getSemanticDiagnostics" | "getShorthandAssignmentValueSymbol" | "getSignatureFromDeclaration" | "getSignatureUsages" | "getSignaturesOfType" | "getSourceFile" | "getSourceFileMetadata" | "getSourceFileNames" | "getStringType" | "getSuggestionDiagnostics" | "getSymbolAtLocation" | "getSymbolAtPosition" | "getSymbolOfSourceFile" | "getSymbolOfType" | "getSymbolsAtLocations" | "getSymbolsAtPositions" | "getSymbolsInScope" | "getSymbolsOfSourceFiles" | "getSyntacticDiagnostics" | "getTargetOfSignature" | "getTargetOfType" | "getTargetSymbol" | "getThisParameterOfSignature" | "getThisTypeOfType" | "getTrueTypeOfConditionalType" | "getTypeArguments" | "getTypeAtLocation" | "getTypeAtLocations" | "getTypeAtPosition" | "getTypeFromTypeNode" | "getTypeOfPropertyOfType" | "getTypeOfSymbol" | "getTypeOfSymbolAtLocation" | "getTypeParameterAtPosition" | "getTypeParametersOfSignature" | "getTypeParametersOfType" | "getTypePredicateOfSignature" | "getTypesAtPositions" | "getTypesOfSymbols" | "getTypesOfType" | "getUndefinedType" | "getUnknownType" | "getVoidType" | "getWellKnownSignatures" | "getWellKnownSymbols" | "getWidenedType" | "initialize" | "isArrayLikeType" | "isArrayType" | "isContextSensitive" | "isReadonlySymbol" | "isTypeAssignableTo" | "parseCommandLine" | "parseConfigFile" | "parseJsonConfigFileContent" | "printNode" | "readConfigFile" | "release" | "resolveName" | "saveHeapProfile" | "signatureToSignatureDeclaration" | "startCPUProfile" | "stopCPUProfile" | "transpileDeclaration" | "transpileDeclarationFromFile" | "transpileModule" | "transpileModuleFromFile" | "typeToString" | "typeToTypeNode" | "updateSnapshot" | "updateTemporarySnapshot";
906
+ method: "batchRequests" | "createSnapshot" | "createSourceFile" | "createSourceFileFromFile" | "emit" | "emitToString" | "formatNodeForInsertion" | "getAliasSymbolOfType" | "getAliasTypeArgumentsOfType" | "getAliasedSymbol" | "getAnyType" | "getApparentPropertiesOfType" | "getApparentType" | "getAwaitedType" | "getBaseConstraintOfType" | "getBaseTypeOfLiteralType" | "getBaseTypeOfType" | "getBaseTypes" | "getBigIntType" | "getBindDiagnostics" | "getBooleanType" | "getCheckTypeOfType" | "getCompletionsAtPosition" | "getConfigFileNames" | "getConfigFileParsingDiagnostics" | "getConfigSourceFile" | "getConstantValue" | "getConstraintOfType" | "getConstraintOfTypeParameter" | "getContextualType" | "getContextualTypeForArgument" | "getCurrentLanguageServerSnapshot" | "getDeclarationDiagnostics" | "getDeclarationEmit" | "getDeclaredTypeOfSymbol" | "getDefaultFromTypeParameter" | "getDefaultProjectForFile" | "getDocumentationComment" | "getESSymbolType" | "getExportSpecifierLocalTargetSymbol" | "getExportSymbolOfSymbol" | "getExportSymbolOfSymbolForChecker" | "getExportsOfModule" | "getExportsOfSymbol" | "getExtendsTypeOfType" | "getFalseTypeOfConditionalType" | "getFreshTypeOfType" | "getFullyQualifiedName" | "getGlobalDiagnostics" | "getImmediateAliasedSymbol" | "getImportAdderEdits" | "getIndexInfoOfType" | "getIndexInfosOfType" | "getIndexTypeOfType" | "getIndexTypeOfTypeByKind" | "getJavaScriptEmit" | "getJsDocTags" | "getLocalTypeParametersOfType" | "getMemberInModuleExports" | "getMembersOfSymbol" | "getModeForResolutionAtIndex" | "getModeForUsageLocation" | "getNeverType" | "getNonMissingTypeOfSymbol" | "getNonNullableType" | "getNonPrimitiveType" | "getNullType" | "getNumberType" | "getObjectTypeOfType" | "getOuterTypeParametersOfType" | "getParameterType" | "getParametersOfSignature" | "getParentOfSymbol" | "getProgramDiagnostics" | "getPropertiesOfType" | "getPropertyOfType" | "getReducedType" | "getReferencedSymbolsForNode" | "getReferencesToSymbolInFile" | "getRegularTypeOfType" | "getResolvedModule" | "getResolvedModuleFromModuleSpecifier" | "getResolvedSignature" | "getResolvedTypeReferenceDirective" | "getResolvedTypeReferenceDirectiveFromTypeReferenceDirective" | "getRestTypeOfSignature" | "getReturnTypeOfSignature" | "getSemanticDiagnostics" | "getShorthandAssignmentValueSymbol" | "getSignatureFromDeclaration" | "getSignatureUsages" | "getSignaturesOfType" | "getSourceFile" | "getSourceFileMetadata" | "getSourceFileNames" | "getStringType" | "getSuggestionDiagnostics" | "getSymbolAtLocation" | "getSymbolAtPosition" | "getSymbolOfSourceFile" | "getSymbolOfType" | "getSymbolsAtLocations" | "getSymbolsAtPositions" | "getSymbolsInScope" | "getSymbolsOfSourceFiles" | "getSyntacticDiagnostics" | "getTargetOfSignature" | "getTargetOfType" | "getTargetSymbol" | "getThisParameterOfSignature" | "getThisTypeOfType" | "getTrueTypeOfConditionalType" | "getTypeArguments" | "getTypeAtLocation" | "getTypeAtLocations" | "getTypeAtPosition" | "getTypeFromTypeNode" | "getTypeOfPropertyOfType" | "getTypeOfSymbol" | "getTypeOfSymbolAtLocation" | "getTypeParameterAtPosition" | "getTypeParametersOfSignature" | "getTypeParametersOfType" | "getTypePredicateOfSignature" | "getTypesAtPositions" | "getTypesOfSymbols" | "getTypesOfType" | "getUndefinedType" | "getUnknownType" | "getVoidType" | "getWellKnownSignatures" | "getWellKnownSymbols" | "getWidenedType" | "initialize" | "isArrayLikeType" | "isArrayType" | "isContextSensitive" | "isReadonlySymbol" | "isTypeAssignableTo" | "parseCommandLine" | "parseConfigFile" | "parseJsonConfigFileContent" | "printNode" | "readConfigFile" | "release" | "resolveName" | "saveHeapProfile" | "signatureToSignatureDeclaration" | "startCPUProfile" | "stopCPUProfile" | "transpileDeclaration" | "transpileDeclarationFromFile" | "transpileModule" | "transpileModuleFromFile" | "typeToString" | "typeToTypeNode" | "updateSnapshot";
925
907
  result: unknown;
926
908
  error?: string | undefined;
927
909
  }
928
910
  /**
929
- * APIFileChanges describes file changes to apply when updating a snapshot.
930
- * Either InvalidateAll is true (discard all caches) or Changed/Created/Deleted
931
- * list individual documents.
911
+ * SnapshotRequestChangesParams describes project, file, and program changes to apply
912
+ * while creating or updating a snapshot.
913
+ */
914
+ export interface SnapshotRequestChangesParams {
915
+ /** OpenProjects lists tsconfig.json files to open/load in the new snapshot. */
916
+ openProjects?: readonly DocumentIdentifier[] | undefined;
917
+ /**
918
+ * CloseProjects lists tsconfig.json files to release in the new snapshot.
919
+ * A project is only unloaded once every API client that opened it closes it.
920
+ */
921
+ closeProjects?: readonly DocumentIdentifier[] | undefined;
922
+ /**
923
+ * OpenFiles lists files to open in the new snapshot, mirroring LSP's
924
+ * textDocument/didOpen. For each file, ancestor directories are searched for a
925
+ * tsconfig that contains it; if found, that configured project is loaded and
926
+ * becomes the file's default project. Otherwise the file is loaded into the
927
+ * inferred project (e.g. a node_modules d.ts not in any project's import graph).
928
+ */
929
+ openFiles?: readonly DocumentIdentifier[] | undefined;
930
+ /**
931
+ * CloseFiles lists files to release in the new snapshot. A file is only fully
932
+ * closed once every API client that opened it closes it.
933
+ */
934
+ closeFiles?: readonly DocumentIdentifier[] | undefined;
935
+ /** CreatePrograms describes synthetic programs to create in the snapshot. */
936
+ createPrograms?: readonly CreateSnapshotProgramParams[] | undefined;
937
+ /** ReconfigurePrograms replaces the configuration of existing synthetic programs. */
938
+ reconfigurePrograms?: readonly ReconfigureSnapshotProgramParams[] | undefined;
939
+ /** RemovePrograms lists synthetic project handles to remove from the snapshot. */
940
+ removePrograms?: readonly SyntheticProjectId[] | undefined;
941
+ /**
942
+ * EnsurePrograms identifies projects whose programs should be updated if dirty,
943
+ * or all contained projects when true.
944
+ */
945
+ ensurePrograms?: EnsurePrograms | undefined;
946
+ }
947
+ /**
948
+ * FileNotifications describes changes to files that have occurred on the host
949
+ * file system, used to notify the session to reload cached files and reevaluate
950
+ * tsconfig.json `include` globs. Either InvalidateAll is true (discard all caches)
951
+ * or Changed/Created/Deleted list individual documents.
932
952
  */
933
- export interface APIFileChanges {
953
+ export interface FileNotifications {
934
954
  invalidateAll?: boolean | undefined;
935
955
  changed?: DocumentIdentifier[] | undefined;
936
956
  created?: DocumentIdentifier[] | undefined;
@@ -955,8 +975,8 @@ export interface RequestFileSystem {
955
975
  removedPaths?: string[] | undefined;
956
976
  }
957
977
  /**
958
- * SnapshotChanges describes what changed between the previous latest snapshot
959
- * and the newly created snapshot. Changes are reported per-project so clients
978
+ * SnapshotChanges describes what changed between a response base and a new
979
+ * snapshot. Changes are reported per-project so clients
960
980
  * can track cache refs at the (snapshot, project) level.
961
981
  */
962
982
  export interface SnapshotChanges {
@@ -969,16 +989,17 @@ export interface SnapshotChanges {
969
989
  * RemovedProjects lists project handles that were present in the previous
970
990
  * snapshot but absent from the new one.
971
991
  */
972
- removedProjects?: string[] | undefined;
992
+ removedProjects?: ProjectId[] | undefined;
973
993
  }
974
- export interface CreateProgramOptions {
975
- compilerOptions: CompilerOptions;
976
- projectReferences?: ProjectReference[] | undefined;
977
- configFileParsingDiagnostics?: DiagnosticResponse[] | undefined;
994
+ export interface SnapshotOperationResponse {
995
+ createdPrograms?: SyntheticProjectId[] | undefined;
996
+ openedFiles?: OpenedFileOperationResult[] | undefined;
978
997
  }
979
- export interface CreateProgramOldProgramParams {
980
- snapshot?: number | undefined;
981
- project?: string | undefined;
998
+ /**
999
+ * LanguageServerSnapshotChanges describes API-driven changes to adopt into the
1000
+ * language server's canonical state.
1001
+ */
1002
+ export interface LanguageServerSnapshotChanges extends SnapshotRequestChangesParams {
982
1003
  }
983
1004
  /** CompilerOptions contains the compiler options exposed by the API. */
984
1005
  export interface CompilerOptions {
@@ -1099,6 +1120,9 @@ export interface TypeAcquisition {
1099
1120
  exclude?: string[] | undefined;
1100
1121
  disableFilenameBasedTypeAcquisition?: boolean | undefined;
1101
1122
  }
1123
+ export interface CreateSourceFileOptions {
1124
+ scriptKind?: ScriptKind | undefined;
1125
+ }
1102
1126
  export interface TranspileOptions {
1103
1127
  compilerOptions?: CompilerOptions | undefined;
1104
1128
  fileName?: string | undefined;
@@ -1139,6 +1163,17 @@ export interface EmitOutputFile {
1139
1163
  text: string;
1140
1164
  sourceFileName?: string | undefined;
1141
1165
  }
1166
+ export interface CreateSnapshotProgramParams {
1167
+ rootFiles: readonly DocumentIdentifier[] | null;
1168
+ compilerOptions: CompilerOptions;
1169
+ options?: CreateProgramOptions | undefined;
1170
+ }
1171
+ export interface ReconfigureSnapshotProgramParams {
1172
+ id: SyntheticProjectId;
1173
+ rootFiles: readonly DocumentIdentifier[] | null;
1174
+ compilerOptions: CompilerOptions;
1175
+ options?: CreateProgramOptions | undefined;
1176
+ }
1142
1177
  /**
1143
1178
  * RequestDirectoryEntries is a cached directory listing. Entry names are
1144
1179
  * relative to the directory, matching vfs.GetAccessibleEntries.
@@ -1167,9 +1202,16 @@ export interface ProjectFileChanges {
1167
1202
  /** DeletedFiles lists source file paths removed from the project's program. */
1168
1203
  deletedFiles?: string[] | undefined;
1169
1204
  }
1205
+ export interface OpenedFileOperationResult {
1206
+ project: ProjectId;
1207
+ }
1170
1208
  /** CompletionEntryLabelDetailsResponse holds additional label display text for a completion entry. */
1171
1209
  export interface CompletionEntryLabelDetailsResponse {
1172
1210
  detail?: string | undefined;
1173
1211
  description?: string | undefined;
1174
1212
  }
1213
+ export interface CreateProgramOptions {
1214
+ projectReferences?: ProjectReference[] | undefined;
1215
+ configFileParsingDiagnostics?: DiagnosticResponse[] | undefined;
1216
+ }
1175
1217
  //# sourceMappingURL=proto.generated.d.ts.map