typescript 5.3.0-dev.20230922 → 5.3.0-dev.20230923

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.
@@ -171,6 +171,7 @@ declare namespace ts {
171
171
  ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
172
172
  ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls",
173
173
  ProvideInlayHints = "provideInlayHints",
174
+ WatchChange = "watchChange",
174
175
  }
175
176
  /**
176
177
  * A TypeScript Server message
@@ -1504,6 +1505,15 @@ declare namespace ts {
1504
1505
  interface CloseRequest extends FileRequest {
1505
1506
  command: CommandTypes.Close;
1506
1507
  }
1508
+ interface WatchChangeRequest extends Request {
1509
+ command: CommandTypes.WatchChange;
1510
+ arguments: WatchChangeRequestArgs;
1511
+ }
1512
+ interface WatchChangeRequestArgs {
1513
+ id: number;
1514
+ path: string;
1515
+ eventType: "create" | "delete" | "update";
1516
+ }
1507
1517
  /**
1508
1518
  * Request to obtain the list of files that should be regenerated if target file is recompiled.
1509
1519
  * NOTE: this us query-only operation and does not generate any output on disk.
@@ -2421,6 +2431,33 @@ declare namespace ts {
2421
2431
  */
2422
2432
  maxFileSize: number;
2423
2433
  }
2434
+ type CreateFileWatcherEventName = "createFileWatcher";
2435
+ interface CreateFileWatcherEvent extends Event {
2436
+ readonly event: CreateFileWatcherEventName;
2437
+ readonly body: CreateFileWatcherEventBody;
2438
+ }
2439
+ interface CreateFileWatcherEventBody {
2440
+ readonly id: number;
2441
+ readonly path: string;
2442
+ }
2443
+ type CreateDirectoryWatcherEventName = "createDirectoryWatcher";
2444
+ interface CreateDirectoryWatcherEvent extends Event {
2445
+ readonly event: CreateDirectoryWatcherEventName;
2446
+ readonly body: CreateDirectoryWatcherEventBody;
2447
+ }
2448
+ interface CreateDirectoryWatcherEventBody {
2449
+ readonly id: number;
2450
+ readonly path: string;
2451
+ readonly recursive: boolean;
2452
+ }
2453
+ type CloseFileWatcherEventName = "closeFileWatcher";
2454
+ interface CloseFileWatcherEvent extends Event {
2455
+ readonly event: CloseFileWatcherEventName;
2456
+ readonly body: CloseFileWatcherEventBody;
2457
+ }
2458
+ interface CloseFileWatcherEventBody {
2459
+ readonly id: number;
2460
+ }
2424
2461
  /**
2425
2462
  * Arguments for reload request.
2426
2463
  */
@@ -3528,6 +3565,21 @@ declare namespace ts {
3528
3565
  readonly eventName: typeof OpenFileInfoTelemetryEvent;
3529
3566
  readonly data: OpenFileInfoTelemetryEventData;
3530
3567
  }
3568
+ const CreateFileWatcherEvent: protocol.CreateFileWatcherEventName;
3569
+ interface CreateFileWatcherEvent {
3570
+ readonly eventName: protocol.CreateFileWatcherEventName;
3571
+ readonly data: protocol.CreateFileWatcherEventBody;
3572
+ }
3573
+ const CreateDirectoryWatcherEvent: protocol.CreateDirectoryWatcherEventName;
3574
+ interface CreateDirectoryWatcherEvent {
3575
+ readonly eventName: protocol.CreateDirectoryWatcherEventName;
3576
+ readonly data: protocol.CreateDirectoryWatcherEventBody;
3577
+ }
3578
+ const CloseFileWatcherEvent: protocol.CloseFileWatcherEventName;
3579
+ interface CloseFileWatcherEvent {
3580
+ readonly eventName: protocol.CloseFileWatcherEventName;
3581
+ readonly data: protocol.CloseFileWatcherEventBody;
3582
+ }
3531
3583
  interface ProjectInfoTelemetryEventData {
3532
3584
  /** Cryptographically secure hash of project file location. */
3533
3585
  readonly projectId: string;
@@ -3575,7 +3627,7 @@ declare namespace ts {
3575
3627
  interface OpenFileInfo {
3576
3628
  readonly checkJs: boolean;
3577
3629
  }
3578
- type ProjectServiceEvent = LargeFileReferencedEvent | ProjectsUpdatedInBackgroundEvent | ProjectLoadingStartEvent | ProjectLoadingFinishEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent | ProjectInfoTelemetryEvent | OpenFileInfoTelemetryEvent;
3630
+ type ProjectServiceEvent = LargeFileReferencedEvent | ProjectsUpdatedInBackgroundEvent | ProjectLoadingStartEvent | ProjectLoadingFinishEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent | ProjectInfoTelemetryEvent | OpenFileInfoTelemetryEvent | CreateFileWatcherEvent | CreateDirectoryWatcherEvent | CloseFileWatcherEvent;
3579
3631
  type ProjectServiceEventHandler = (event: ProjectServiceEvent) => void;
3580
3632
  interface SafeList {
3581
3633
  [name: string]: {
@@ -3609,6 +3661,7 @@ declare namespace ts {
3609
3661
  useInferredProjectPerProjectRoot: boolean;
3610
3662
  typingsInstaller?: ITypingsInstaller;
3611
3663
  eventHandler?: ProjectServiceEventHandler;
3664
+ canUseWatchEvents?: boolean;
3612
3665
  suppressDiagnosticEvents?: boolean;
3613
3666
  throttleWaitMilliseconds?: number;
3614
3667
  globalPlugins?: readonly string[];
@@ -3680,7 +3733,6 @@ declare namespace ts {
3680
3733
  readonly typingsInstaller: ITypingsInstaller;
3681
3734
  private readonly globalCacheLocationDirectoryPath;
3682
3735
  readonly throttleWaitMilliseconds?: number;
3683
- private readonly eventHandler?;
3684
3736
  private readonly suppressDiagnosticEvents?;
3685
3737
  readonly globalPlugins: readonly string[];
3686
3738
  readonly pluginProbeLocations: readonly string[];
@@ -3894,6 +3946,7 @@ declare namespace ts {
3894
3946
  * If falsy, all events are suppressed.
3895
3947
  */
3896
3948
  canUseEvents: boolean;
3949
+ canUseWatchEvents?: boolean;
3897
3950
  eventHandler?: ProjectServiceEventHandler;
3898
3951
  /** Has no effect if eventHandler is also specified. */
3899
3952
  suppressDiagnosticEvents?: boolean;
@@ -7260,6 +7313,7 @@ declare namespace ts {
7260
7313
  declaration?: SignatureDeclaration | JSDocSignature;
7261
7314
  typeParameters?: readonly TypeParameter[];
7262
7315
  parameters: readonly Symbol[];
7316
+ thisParameter?: Symbol;
7263
7317
  }
7264
7318
  interface Signature {
7265
7319
  getDeclaration(): SignatureDeclaration;