@types/webworker 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,4 +45,4 @@ This project does not respect semantic versioning as almost every change could p
45
45
 
46
46
  ## Deploy Metadata
47
47
 
48
- You can read what changed in version 0.0.21 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.21.
48
+ You can read what changed in version 0.0.22 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.22.
package/index.d.ts CHANGED
@@ -798,6 +798,12 @@ interface RsaPssParams extends Algorithm {
798
798
  saltLength: number;
799
799
  }
800
800
 
801
+ interface SchedulerPostTaskOptions {
802
+ delay?: number;
803
+ priority?: TaskPriority;
804
+ signal?: AbortSignal;
805
+ }
806
+
801
807
  interface SecurityPolicyViolationEventInit extends EventInit {
802
808
  blockedURI?: string;
803
809
  columnNumber?: number;
@@ -846,6 +852,18 @@ interface StructuredSerializeOptions {
846
852
  transfer?: Transferable[];
847
853
  }
848
854
 
855
+ interface TaskControllerInit {
856
+ priority?: TaskPriority;
857
+ }
858
+
859
+ interface TaskPriorityChangeEventInit extends EventInit {
860
+ previousPriority: TaskPriority;
861
+ }
862
+
863
+ interface TaskSignalAnyInit {
864
+ priority?: TaskPriority | TaskSignal;
865
+ }
866
+
849
867
  interface TextDecodeOptions {
850
868
  stream?: boolean;
851
869
  }
@@ -7900,6 +7918,31 @@ declare var Response: {
7900
7918
  redirect(url: string | URL, status?: number): Response;
7901
7919
  };
7902
7920
 
7921
+ /**
7922
+ * The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
7923
+ *
7924
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
7925
+ */
7926
+ interface Scheduler {
7927
+ /**
7928
+ * The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
7929
+ *
7930
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
7931
+ */
7932
+ postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
7933
+ /**
7934
+ * The **`yield()`** method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).
7935
+ *
7936
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
7937
+ */
7938
+ yield(): Promise<void>;
7939
+ }
7940
+
7941
+ declare var Scheduler: {
7942
+ prototype: Scheduler;
7943
+ new(): Scheduler;
7944
+ };
7945
+
7903
7946
  /**
7904
7947
  * The **`SecurityPolicyViolationEvent`** interface inherits from Event, and represents the event object of a `securitypolicyviolation` event sent on an Element/securitypolicyviolation_event, Document/securitypolicyviolation_event, or WorkerGlobalScope/securitypolicyviolation_event when its Content Security Policy (CSP) is violated.
7905
7948
  *
@@ -8468,6 +8511,79 @@ declare var SubtleCrypto: {
8468
8511
  new(): SubtleCrypto;
8469
8512
  };
8470
8513
 
8514
+ /**
8515
+ * The **`TaskController`** interface of the Prioritized Task Scheduling API represents a controller object that can be used to both abort and change the priority of one or more prioritized tasks.
8516
+ *
8517
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
8518
+ */
8519
+ interface TaskController extends AbortController {
8520
+ /**
8521
+ * The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
8522
+ *
8523
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
8524
+ */
8525
+ setPriority(priority: TaskPriority): void;
8526
+ }
8527
+
8528
+ declare var TaskController: {
8529
+ prototype: TaskController;
8530
+ new(init?: TaskControllerInit): TaskController;
8531
+ };
8532
+
8533
+ /**
8534
+ * The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
8535
+ *
8536
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
8537
+ */
8538
+ interface TaskPriorityChangeEvent extends Event {
8539
+ /**
8540
+ * The **`previousPriority`** read-only property of the TaskPriorityChangeEvent interface returns the priority of the corresponding TaskSignal before it was changed and this `prioritychange` event was emitted.
8541
+ *
8542
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
8543
+ */
8544
+ readonly previousPriority: TaskPriority;
8545
+ }
8546
+
8547
+ declare var TaskPriorityChangeEvent: {
8548
+ prototype: TaskPriorityChangeEvent;
8549
+ new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
8550
+ };
8551
+
8552
+ interface TaskSignalEventMap extends AbortSignalEventMap {
8553
+ "prioritychange": TaskPriorityChangeEvent;
8554
+ }
8555
+
8556
+ /**
8557
+ * The **`TaskSignal`** interface of the Prioritized Task Scheduling API represents a signal object that allows you to communicate with a prioritized task, and abort it or change the priority (if required) via a TaskController object.
8558
+ *
8559
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
8560
+ */
8561
+ interface TaskSignal extends AbortSignal {
8562
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
8563
+ onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
8564
+ /**
8565
+ * The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
8566
+ *
8567
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
8568
+ */
8569
+ readonly priority: TaskPriority;
8570
+ addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
8571
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
8572
+ removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
8573
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
8574
+ }
8575
+
8576
+ declare var TaskSignal: {
8577
+ prototype: TaskSignal;
8578
+ new(): TaskSignal;
8579
+ /**
8580
+ * The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
8581
+ *
8582
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
8583
+ */
8584
+ any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
8585
+ };
8586
+
8471
8587
  /**
8472
8588
  * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
8473
8589
  *
@@ -12067,6 +12183,8 @@ interface WindowOrWorkerGlobalScope {
12067
12183
  readonly origin: string;
12068
12184
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
12069
12185
  readonly performance: Performance;
12186
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
12187
+ readonly scheduler: Scheduler;
12070
12188
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
12071
12189
  atob(data: string): string;
12072
12190
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -12972,6 +13090,10 @@ interface ReportingObserverCallback {
12972
13090
  (reports: Report[], observer: ReportingObserver): void;
12973
13091
  }
12974
13092
 
13093
+ interface SchedulerPostTaskCallback {
13094
+ (): any;
13095
+ }
13096
+
12975
13097
  interface TransformerFlushCallback<O> {
12976
13098
  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
12977
13099
  }
@@ -13113,6 +13235,8 @@ declare var isSecureContext: boolean;
13113
13235
  declare var origin: string;
13114
13236
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
13115
13237
  declare var performance: Performance;
13238
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
13239
+ declare var scheduler: Scheduler;
13116
13240
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
13117
13241
  declare function atob(data: string): string;
13118
13242
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -13277,6 +13401,7 @@ type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaquer
13277
13401
  type SecurityPolicyViolationEventDisposition = "enforce" | "report";
13278
13402
  type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
13279
13403
  type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
13404
+ type TaskPriority = "background" | "user-blocking" | "user-visible";
13280
13405
  type TransferFunction = "hlg" | "pq" | "srgb";
13281
13406
  type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
13282
13407
  type VideoEncoderBitrateMode = "constant" | "quantizer" | "variable";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/webworker",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Types for the global scope of Web Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -798,6 +798,12 @@ interface RsaPssParams extends Algorithm {
798
798
  saltLength: number;
799
799
  }
800
800
 
801
+ interface SchedulerPostTaskOptions {
802
+ delay?: number;
803
+ priority?: TaskPriority;
804
+ signal?: AbortSignal;
805
+ }
806
+
801
807
  interface SecurityPolicyViolationEventInit extends EventInit {
802
808
  blockedURI?: string;
803
809
  columnNumber?: number;
@@ -846,6 +852,18 @@ interface StructuredSerializeOptions {
846
852
  transfer?: Transferable[];
847
853
  }
848
854
 
855
+ interface TaskControllerInit {
856
+ priority?: TaskPriority;
857
+ }
858
+
859
+ interface TaskPriorityChangeEventInit extends EventInit {
860
+ previousPriority: TaskPriority;
861
+ }
862
+
863
+ interface TaskSignalAnyInit {
864
+ priority?: TaskPriority | TaskSignal;
865
+ }
866
+
849
867
  interface TextDecodeOptions {
850
868
  stream?: boolean;
851
869
  }
@@ -7900,6 +7918,31 @@ declare var Response: {
7900
7918
  redirect(url: string | URL, status?: number): Response;
7901
7919
  };
7902
7920
 
7921
+ /**
7922
+ * The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
7923
+ *
7924
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
7925
+ */
7926
+ interface Scheduler {
7927
+ /**
7928
+ * The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
7929
+ *
7930
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
7931
+ */
7932
+ postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
7933
+ /**
7934
+ * The **`yield()`** method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).
7935
+ *
7936
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
7937
+ */
7938
+ yield(): Promise<void>;
7939
+ }
7940
+
7941
+ declare var Scheduler: {
7942
+ prototype: Scheduler;
7943
+ new(): Scheduler;
7944
+ };
7945
+
7903
7946
  /**
7904
7947
  * The **`SecurityPolicyViolationEvent`** interface inherits from Event, and represents the event object of a `securitypolicyviolation` event sent on an Element/securitypolicyviolation_event, Document/securitypolicyviolation_event, or WorkerGlobalScope/securitypolicyviolation_event when its Content Security Policy (CSP) is violated.
7905
7948
  *
@@ -8468,6 +8511,79 @@ declare var SubtleCrypto: {
8468
8511
  new(): SubtleCrypto;
8469
8512
  };
8470
8513
 
8514
+ /**
8515
+ * The **`TaskController`** interface of the Prioritized Task Scheduling API represents a controller object that can be used to both abort and change the priority of one or more prioritized tasks.
8516
+ *
8517
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
8518
+ */
8519
+ interface TaskController extends AbortController {
8520
+ /**
8521
+ * The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
8522
+ *
8523
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
8524
+ */
8525
+ setPriority(priority: TaskPriority): void;
8526
+ }
8527
+
8528
+ declare var TaskController: {
8529
+ prototype: TaskController;
8530
+ new(init?: TaskControllerInit): TaskController;
8531
+ };
8532
+
8533
+ /**
8534
+ * The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
8535
+ *
8536
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
8537
+ */
8538
+ interface TaskPriorityChangeEvent extends Event {
8539
+ /**
8540
+ * The **`previousPriority`** read-only property of the TaskPriorityChangeEvent interface returns the priority of the corresponding TaskSignal before it was changed and this `prioritychange` event was emitted.
8541
+ *
8542
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
8543
+ */
8544
+ readonly previousPriority: TaskPriority;
8545
+ }
8546
+
8547
+ declare var TaskPriorityChangeEvent: {
8548
+ prototype: TaskPriorityChangeEvent;
8549
+ new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
8550
+ };
8551
+
8552
+ interface TaskSignalEventMap extends AbortSignalEventMap {
8553
+ "prioritychange": TaskPriorityChangeEvent;
8554
+ }
8555
+
8556
+ /**
8557
+ * The **`TaskSignal`** interface of the Prioritized Task Scheduling API represents a signal object that allows you to communicate with a prioritized task, and abort it or change the priority (if required) via a TaskController object.
8558
+ *
8559
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
8560
+ */
8561
+ interface TaskSignal extends AbortSignal {
8562
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
8563
+ onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
8564
+ /**
8565
+ * The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
8566
+ *
8567
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
8568
+ */
8569
+ readonly priority: TaskPriority;
8570
+ addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
8571
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
8572
+ removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
8573
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
8574
+ }
8575
+
8576
+ declare var TaskSignal: {
8577
+ prototype: TaskSignal;
8578
+ new(): TaskSignal;
8579
+ /**
8580
+ * The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
8581
+ *
8582
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
8583
+ */
8584
+ any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
8585
+ };
8586
+
8471
8587
  /**
8472
8588
  * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
8473
8589
  *
@@ -12067,6 +12183,8 @@ interface WindowOrWorkerGlobalScope {
12067
12183
  readonly origin: string;
12068
12184
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
12069
12185
  readonly performance: Performance;
12186
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
12187
+ readonly scheduler: Scheduler;
12070
12188
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
12071
12189
  atob(data: string): string;
12072
12190
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -12972,6 +13090,10 @@ interface ReportingObserverCallback {
12972
13090
  (reports: Report[], observer: ReportingObserver): void;
12973
13091
  }
12974
13092
 
13093
+ interface SchedulerPostTaskCallback {
13094
+ (): any;
13095
+ }
13096
+
12975
13097
  interface TransformerFlushCallback<O> {
12976
13098
  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
12977
13099
  }
@@ -13113,6 +13235,8 @@ declare var isSecureContext: boolean;
13113
13235
  declare var origin: string;
13114
13236
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
13115
13237
  declare var performance: Performance;
13238
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
13239
+ declare var scheduler: Scheduler;
13116
13240
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
13117
13241
  declare function atob(data: string): string;
13118
13242
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -13277,6 +13401,7 @@ type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaquer
13277
13401
  type SecurityPolicyViolationEventDisposition = "enforce" | "report";
13278
13402
  type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
13279
13403
  type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
13404
+ type TaskPriority = "background" | "user-blocking" | "user-visible";
13280
13405
  type TransferFunction = "hlg" | "pq" | "srgb";
13281
13406
  type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
13282
13407
  type VideoEncoderBitrateMode = "constant" | "quantizer" | "variable";
package/ts5.6/index.d.ts CHANGED
@@ -798,6 +798,12 @@ interface RsaPssParams extends Algorithm {
798
798
  saltLength: number;
799
799
  }
800
800
 
801
+ interface SchedulerPostTaskOptions {
802
+ delay?: number;
803
+ priority?: TaskPriority;
804
+ signal?: AbortSignal;
805
+ }
806
+
801
807
  interface SecurityPolicyViolationEventInit extends EventInit {
802
808
  blockedURI?: string;
803
809
  columnNumber?: number;
@@ -846,6 +852,18 @@ interface StructuredSerializeOptions {
846
852
  transfer?: Transferable[];
847
853
  }
848
854
 
855
+ interface TaskControllerInit {
856
+ priority?: TaskPriority;
857
+ }
858
+
859
+ interface TaskPriorityChangeEventInit extends EventInit {
860
+ previousPriority: TaskPriority;
861
+ }
862
+
863
+ interface TaskSignalAnyInit {
864
+ priority?: TaskPriority | TaskSignal;
865
+ }
866
+
849
867
  interface TextDecodeOptions {
850
868
  stream?: boolean;
851
869
  }
@@ -7900,6 +7918,31 @@ declare var Response: {
7900
7918
  redirect(url: string | URL, status?: number): Response;
7901
7919
  };
7902
7920
 
7921
+ /**
7922
+ * The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
7923
+ *
7924
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
7925
+ */
7926
+ interface Scheduler {
7927
+ /**
7928
+ * The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
7929
+ *
7930
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
7931
+ */
7932
+ postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
7933
+ /**
7934
+ * The **`yield()`** method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).
7935
+ *
7936
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
7937
+ */
7938
+ yield(): Promise<void>;
7939
+ }
7940
+
7941
+ declare var Scheduler: {
7942
+ prototype: Scheduler;
7943
+ new(): Scheduler;
7944
+ };
7945
+
7903
7946
  /**
7904
7947
  * The **`SecurityPolicyViolationEvent`** interface inherits from Event, and represents the event object of a `securitypolicyviolation` event sent on an Element/securitypolicyviolation_event, Document/securitypolicyviolation_event, or WorkerGlobalScope/securitypolicyviolation_event when its Content Security Policy (CSP) is violated.
7905
7948
  *
@@ -8468,6 +8511,79 @@ declare var SubtleCrypto: {
8468
8511
  new(): SubtleCrypto;
8469
8512
  };
8470
8513
 
8514
+ /**
8515
+ * The **`TaskController`** interface of the Prioritized Task Scheduling API represents a controller object that can be used to both abort and change the priority of one or more prioritized tasks.
8516
+ *
8517
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
8518
+ */
8519
+ interface TaskController extends AbortController {
8520
+ /**
8521
+ * The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
8522
+ *
8523
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
8524
+ */
8525
+ setPriority(priority: TaskPriority): void;
8526
+ }
8527
+
8528
+ declare var TaskController: {
8529
+ prototype: TaskController;
8530
+ new(init?: TaskControllerInit): TaskController;
8531
+ };
8532
+
8533
+ /**
8534
+ * The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
8535
+ *
8536
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
8537
+ */
8538
+ interface TaskPriorityChangeEvent extends Event {
8539
+ /**
8540
+ * The **`previousPriority`** read-only property of the TaskPriorityChangeEvent interface returns the priority of the corresponding TaskSignal before it was changed and this `prioritychange` event was emitted.
8541
+ *
8542
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
8543
+ */
8544
+ readonly previousPriority: TaskPriority;
8545
+ }
8546
+
8547
+ declare var TaskPriorityChangeEvent: {
8548
+ prototype: TaskPriorityChangeEvent;
8549
+ new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
8550
+ };
8551
+
8552
+ interface TaskSignalEventMap extends AbortSignalEventMap {
8553
+ "prioritychange": TaskPriorityChangeEvent;
8554
+ }
8555
+
8556
+ /**
8557
+ * The **`TaskSignal`** interface of the Prioritized Task Scheduling API represents a signal object that allows you to communicate with a prioritized task, and abort it or change the priority (if required) via a TaskController object.
8558
+ *
8559
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
8560
+ */
8561
+ interface TaskSignal extends AbortSignal {
8562
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
8563
+ onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
8564
+ /**
8565
+ * The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
8566
+ *
8567
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
8568
+ */
8569
+ readonly priority: TaskPriority;
8570
+ addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
8571
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
8572
+ removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
8573
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
8574
+ }
8575
+
8576
+ declare var TaskSignal: {
8577
+ prototype: TaskSignal;
8578
+ new(): TaskSignal;
8579
+ /**
8580
+ * The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
8581
+ *
8582
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
8583
+ */
8584
+ any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
8585
+ };
8586
+
8471
8587
  /**
8472
8588
  * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
8473
8589
  *
@@ -12067,6 +12183,8 @@ interface WindowOrWorkerGlobalScope {
12067
12183
  readonly origin: string;
12068
12184
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
12069
12185
  readonly performance: Performance;
12186
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
12187
+ readonly scheduler: Scheduler;
12070
12188
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
12071
12189
  atob(data: string): string;
12072
12190
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -12972,6 +13090,10 @@ interface ReportingObserverCallback {
12972
13090
  (reports: Report[], observer: ReportingObserver): void;
12973
13091
  }
12974
13092
 
13093
+ interface SchedulerPostTaskCallback {
13094
+ (): any;
13095
+ }
13096
+
12975
13097
  interface TransformerFlushCallback<O> {
12976
13098
  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
12977
13099
  }
@@ -13113,6 +13235,8 @@ declare var isSecureContext: boolean;
13113
13235
  declare var origin: string;
13114
13236
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
13115
13237
  declare var performance: Performance;
13238
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
13239
+ declare var scheduler: Scheduler;
13116
13240
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
13117
13241
  declare function atob(data: string): string;
13118
13242
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -13277,6 +13401,7 @@ type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaquer
13277
13401
  type SecurityPolicyViolationEventDisposition = "enforce" | "report";
13278
13402
  type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
13279
13403
  type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
13404
+ type TaskPriority = "background" | "user-blocking" | "user-visible";
13280
13405
  type TransferFunction = "hlg" | "pq" | "srgb";
13281
13406
  type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
13282
13407
  type VideoEncoderBitrateMode = "constant" | "quantizer" | "variable";