@types/sharedworker 0.0.173 → 0.0.175
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 +1 -1
- package/index.d.ts +126 -1
- package/package.json +1 -1
- package/ts5.5/index.d.ts +126 -1
- package/ts5.6/index.d.ts +126 -1
package/README.md
CHANGED
|
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
|
|
|
28
28
|
|
|
29
29
|
## Deploy Metadata
|
|
30
30
|
|
|
31
|
-
You can read what changed in version 0.0.
|
|
31
|
+
You can read what changed in version 0.0.175 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.175.
|
package/index.d.ts
CHANGED
|
@@ -584,6 +584,12 @@ interface RsaPssParams extends Algorithm {
|
|
|
584
584
|
saltLength: number;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
+
interface SchedulerPostTaskOptions {
|
|
588
|
+
delay?: number;
|
|
589
|
+
priority?: TaskPriority;
|
|
590
|
+
signal?: AbortSignal;
|
|
591
|
+
}
|
|
592
|
+
|
|
587
593
|
interface SecurityPolicyViolationEventInit extends EventInit {
|
|
588
594
|
blockedURI?: string;
|
|
589
595
|
columnNumber?: number;
|
|
@@ -632,6 +638,18 @@ interface StructuredSerializeOptions {
|
|
|
632
638
|
transfer?: Transferable[];
|
|
633
639
|
}
|
|
634
640
|
|
|
641
|
+
interface TaskControllerInit {
|
|
642
|
+
priority?: TaskPriority;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
interface TaskPriorityChangeEventInit extends EventInit {
|
|
646
|
+
previousPriority: TaskPriority;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
interface TaskSignalAnyInit {
|
|
650
|
+
priority?: TaskPriority | TaskSignal;
|
|
651
|
+
}
|
|
652
|
+
|
|
635
653
|
interface TextDecodeOptions {
|
|
636
654
|
stream?: boolean;
|
|
637
655
|
}
|
|
@@ -6381,6 +6399,31 @@ declare var Response: {
|
|
|
6381
6399
|
redirect(url: string | URL, status?: number): Response;
|
|
6382
6400
|
};
|
|
6383
6401
|
|
|
6402
|
+
/**
|
|
6403
|
+
* The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
|
|
6404
|
+
*
|
|
6405
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
|
|
6406
|
+
*/
|
|
6407
|
+
interface Scheduler {
|
|
6408
|
+
/**
|
|
6409
|
+
* The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
|
|
6410
|
+
*
|
|
6411
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
|
|
6412
|
+
*/
|
|
6413
|
+
postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
|
|
6414
|
+
/**
|
|
6415
|
+
* 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).
|
|
6416
|
+
*
|
|
6417
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
|
|
6418
|
+
*/
|
|
6419
|
+
yield(): Promise<void>;
|
|
6420
|
+
}
|
|
6421
|
+
|
|
6422
|
+
declare var Scheduler: {
|
|
6423
|
+
prototype: Scheduler;
|
|
6424
|
+
new(): Scheduler;
|
|
6425
|
+
};
|
|
6426
|
+
|
|
6384
6427
|
/**
|
|
6385
6428
|
* 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.
|
|
6386
6429
|
*
|
|
@@ -6862,6 +6905,79 @@ declare var SubtleCrypto: {
|
|
|
6862
6905
|
new(): SubtleCrypto;
|
|
6863
6906
|
};
|
|
6864
6907
|
|
|
6908
|
+
/**
|
|
6909
|
+
* 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.
|
|
6910
|
+
*
|
|
6911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
|
|
6912
|
+
*/
|
|
6913
|
+
interface TaskController extends AbortController {
|
|
6914
|
+
/**
|
|
6915
|
+
* The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
|
|
6916
|
+
*
|
|
6917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
|
|
6918
|
+
*/
|
|
6919
|
+
setPriority(priority: TaskPriority): void;
|
|
6920
|
+
}
|
|
6921
|
+
|
|
6922
|
+
declare var TaskController: {
|
|
6923
|
+
prototype: TaskController;
|
|
6924
|
+
new(init?: TaskControllerInit): TaskController;
|
|
6925
|
+
};
|
|
6926
|
+
|
|
6927
|
+
/**
|
|
6928
|
+
* The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
|
|
6929
|
+
*
|
|
6930
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
|
|
6931
|
+
*/
|
|
6932
|
+
interface TaskPriorityChangeEvent extends Event {
|
|
6933
|
+
/**
|
|
6934
|
+
* 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.
|
|
6935
|
+
*
|
|
6936
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
|
|
6937
|
+
*/
|
|
6938
|
+
readonly previousPriority: TaskPriority;
|
|
6939
|
+
}
|
|
6940
|
+
|
|
6941
|
+
declare var TaskPriorityChangeEvent: {
|
|
6942
|
+
prototype: TaskPriorityChangeEvent;
|
|
6943
|
+
new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
|
|
6944
|
+
};
|
|
6945
|
+
|
|
6946
|
+
interface TaskSignalEventMap extends AbortSignalEventMap {
|
|
6947
|
+
"prioritychange": TaskPriorityChangeEvent;
|
|
6948
|
+
}
|
|
6949
|
+
|
|
6950
|
+
/**
|
|
6951
|
+
* 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.
|
|
6952
|
+
*
|
|
6953
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
|
|
6954
|
+
*/
|
|
6955
|
+
interface TaskSignal extends AbortSignal {
|
|
6956
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
|
|
6957
|
+
onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
|
|
6958
|
+
/**
|
|
6959
|
+
* The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
|
|
6960
|
+
*
|
|
6961
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
|
|
6962
|
+
*/
|
|
6963
|
+
readonly priority: TaskPriority;
|
|
6964
|
+
addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
6965
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
6966
|
+
removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
6967
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
declare var TaskSignal: {
|
|
6971
|
+
prototype: TaskSignal;
|
|
6972
|
+
new(): TaskSignal;
|
|
6973
|
+
/**
|
|
6974
|
+
* The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
|
|
6975
|
+
*
|
|
6976
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
|
|
6977
|
+
*/
|
|
6978
|
+
any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
|
|
6979
|
+
};
|
|
6980
|
+
|
|
6865
6981
|
/**
|
|
6866
6982
|
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
|
|
6867
6983
|
*
|
|
@@ -7210,7 +7326,7 @@ declare var URL: {
|
|
|
7210
7326
|
*/
|
|
7211
7327
|
canParse(url: string | URL, base?: string | URL): boolean;
|
|
7212
7328
|
/**
|
|
7213
|
-
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL
|
|
7329
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
7214
7330
|
*
|
|
7215
7331
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
7216
7332
|
*/
|
|
@@ -10139,6 +10255,8 @@ interface WindowOrWorkerGlobalScope {
|
|
|
10139
10255
|
readonly origin: string;
|
|
10140
10256
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
|
|
10141
10257
|
readonly performance: Performance;
|
|
10258
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
10259
|
+
readonly scheduler: Scheduler;
|
|
10142
10260
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
|
|
10143
10261
|
atob(data: string): string;
|
|
10144
10262
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
|
|
@@ -11028,6 +11146,10 @@ interface ReportingObserverCallback {
|
|
|
11028
11146
|
(reports: Report[], observer: ReportingObserver): void;
|
|
11029
11147
|
}
|
|
11030
11148
|
|
|
11149
|
+
interface SchedulerPostTaskCallback {
|
|
11150
|
+
(): any;
|
|
11151
|
+
}
|
|
11152
|
+
|
|
11031
11153
|
interface TransformerFlushCallback<O> {
|
|
11032
11154
|
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
11033
11155
|
}
|
|
@@ -11154,6 +11276,8 @@ declare var isSecureContext: boolean;
|
|
|
11154
11276
|
declare var origin: string;
|
|
11155
11277
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
|
|
11156
11278
|
declare var performance: Performance;
|
|
11279
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
11280
|
+
declare var scheduler: Scheduler;
|
|
11157
11281
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
|
|
11158
11282
|
declare function atob(data: string): string;
|
|
11159
11283
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
|
|
@@ -11292,6 +11416,7 @@ type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaquer
|
|
|
11292
11416
|
type SecurityPolicyViolationEventDisposition = "enforce" | "report";
|
|
11293
11417
|
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
|
|
11294
11418
|
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
|
11419
|
+
type TaskPriority = "background" | "user-blocking" | "user-visible";
|
|
11295
11420
|
type TransferFunction = "hlg" | "pq" | "srgb";
|
|
11296
11421
|
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
|
|
11297
11422
|
type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
|
package/package.json
CHANGED
package/ts5.5/index.d.ts
CHANGED
|
@@ -584,6 +584,12 @@ interface RsaPssParams extends Algorithm {
|
|
|
584
584
|
saltLength: number;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
+
interface SchedulerPostTaskOptions {
|
|
588
|
+
delay?: number;
|
|
589
|
+
priority?: TaskPriority;
|
|
590
|
+
signal?: AbortSignal;
|
|
591
|
+
}
|
|
592
|
+
|
|
587
593
|
interface SecurityPolicyViolationEventInit extends EventInit {
|
|
588
594
|
blockedURI?: string;
|
|
589
595
|
columnNumber?: number;
|
|
@@ -632,6 +638,18 @@ interface StructuredSerializeOptions {
|
|
|
632
638
|
transfer?: Transferable[];
|
|
633
639
|
}
|
|
634
640
|
|
|
641
|
+
interface TaskControllerInit {
|
|
642
|
+
priority?: TaskPriority;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
interface TaskPriorityChangeEventInit extends EventInit {
|
|
646
|
+
previousPriority: TaskPriority;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
interface TaskSignalAnyInit {
|
|
650
|
+
priority?: TaskPriority | TaskSignal;
|
|
651
|
+
}
|
|
652
|
+
|
|
635
653
|
interface TextDecodeOptions {
|
|
636
654
|
stream?: boolean;
|
|
637
655
|
}
|
|
@@ -6381,6 +6399,31 @@ declare var Response: {
|
|
|
6381
6399
|
redirect(url: string | URL, status?: number): Response;
|
|
6382
6400
|
};
|
|
6383
6401
|
|
|
6402
|
+
/**
|
|
6403
|
+
* The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
|
|
6404
|
+
*
|
|
6405
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
|
|
6406
|
+
*/
|
|
6407
|
+
interface Scheduler {
|
|
6408
|
+
/**
|
|
6409
|
+
* The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
|
|
6410
|
+
*
|
|
6411
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
|
|
6412
|
+
*/
|
|
6413
|
+
postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
|
|
6414
|
+
/**
|
|
6415
|
+
* 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).
|
|
6416
|
+
*
|
|
6417
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
|
|
6418
|
+
*/
|
|
6419
|
+
yield(): Promise<void>;
|
|
6420
|
+
}
|
|
6421
|
+
|
|
6422
|
+
declare var Scheduler: {
|
|
6423
|
+
prototype: Scheduler;
|
|
6424
|
+
new(): Scheduler;
|
|
6425
|
+
};
|
|
6426
|
+
|
|
6384
6427
|
/**
|
|
6385
6428
|
* 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.
|
|
6386
6429
|
*
|
|
@@ -6862,6 +6905,79 @@ declare var SubtleCrypto: {
|
|
|
6862
6905
|
new(): SubtleCrypto;
|
|
6863
6906
|
};
|
|
6864
6907
|
|
|
6908
|
+
/**
|
|
6909
|
+
* 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.
|
|
6910
|
+
*
|
|
6911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
|
|
6912
|
+
*/
|
|
6913
|
+
interface TaskController extends AbortController {
|
|
6914
|
+
/**
|
|
6915
|
+
* The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
|
|
6916
|
+
*
|
|
6917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
|
|
6918
|
+
*/
|
|
6919
|
+
setPriority(priority: TaskPriority): void;
|
|
6920
|
+
}
|
|
6921
|
+
|
|
6922
|
+
declare var TaskController: {
|
|
6923
|
+
prototype: TaskController;
|
|
6924
|
+
new(init?: TaskControllerInit): TaskController;
|
|
6925
|
+
};
|
|
6926
|
+
|
|
6927
|
+
/**
|
|
6928
|
+
* The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
|
|
6929
|
+
*
|
|
6930
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
|
|
6931
|
+
*/
|
|
6932
|
+
interface TaskPriorityChangeEvent extends Event {
|
|
6933
|
+
/**
|
|
6934
|
+
* 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.
|
|
6935
|
+
*
|
|
6936
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
|
|
6937
|
+
*/
|
|
6938
|
+
readonly previousPriority: TaskPriority;
|
|
6939
|
+
}
|
|
6940
|
+
|
|
6941
|
+
declare var TaskPriorityChangeEvent: {
|
|
6942
|
+
prototype: TaskPriorityChangeEvent;
|
|
6943
|
+
new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
|
|
6944
|
+
};
|
|
6945
|
+
|
|
6946
|
+
interface TaskSignalEventMap extends AbortSignalEventMap {
|
|
6947
|
+
"prioritychange": TaskPriorityChangeEvent;
|
|
6948
|
+
}
|
|
6949
|
+
|
|
6950
|
+
/**
|
|
6951
|
+
* 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.
|
|
6952
|
+
*
|
|
6953
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
|
|
6954
|
+
*/
|
|
6955
|
+
interface TaskSignal extends AbortSignal {
|
|
6956
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
|
|
6957
|
+
onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
|
|
6958
|
+
/**
|
|
6959
|
+
* The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
|
|
6960
|
+
*
|
|
6961
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
|
|
6962
|
+
*/
|
|
6963
|
+
readonly priority: TaskPriority;
|
|
6964
|
+
addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
6965
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
6966
|
+
removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
6967
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
declare var TaskSignal: {
|
|
6971
|
+
prototype: TaskSignal;
|
|
6972
|
+
new(): TaskSignal;
|
|
6973
|
+
/**
|
|
6974
|
+
* The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
|
|
6975
|
+
*
|
|
6976
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
|
|
6977
|
+
*/
|
|
6978
|
+
any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
|
|
6979
|
+
};
|
|
6980
|
+
|
|
6865
6981
|
/**
|
|
6866
6982
|
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
|
|
6867
6983
|
*
|
|
@@ -7210,7 +7326,7 @@ declare var URL: {
|
|
|
7210
7326
|
*/
|
|
7211
7327
|
canParse(url: string | URL, base?: string | URL): boolean;
|
|
7212
7328
|
/**
|
|
7213
|
-
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL
|
|
7329
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
7214
7330
|
*
|
|
7215
7331
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
7216
7332
|
*/
|
|
@@ -10139,6 +10255,8 @@ interface WindowOrWorkerGlobalScope {
|
|
|
10139
10255
|
readonly origin: string;
|
|
10140
10256
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
|
|
10141
10257
|
readonly performance: Performance;
|
|
10258
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
10259
|
+
readonly scheduler: Scheduler;
|
|
10142
10260
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
|
|
10143
10261
|
atob(data: string): string;
|
|
10144
10262
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
|
|
@@ -11028,6 +11146,10 @@ interface ReportingObserverCallback {
|
|
|
11028
11146
|
(reports: Report[], observer: ReportingObserver): void;
|
|
11029
11147
|
}
|
|
11030
11148
|
|
|
11149
|
+
interface SchedulerPostTaskCallback {
|
|
11150
|
+
(): any;
|
|
11151
|
+
}
|
|
11152
|
+
|
|
11031
11153
|
interface TransformerFlushCallback<O> {
|
|
11032
11154
|
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
11033
11155
|
}
|
|
@@ -11154,6 +11276,8 @@ declare var isSecureContext: boolean;
|
|
|
11154
11276
|
declare var origin: string;
|
|
11155
11277
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
|
|
11156
11278
|
declare var performance: Performance;
|
|
11279
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
11280
|
+
declare var scheduler: Scheduler;
|
|
11157
11281
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
|
|
11158
11282
|
declare function atob(data: string): string;
|
|
11159
11283
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
|
|
@@ -11292,6 +11416,7 @@ type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaquer
|
|
|
11292
11416
|
type SecurityPolicyViolationEventDisposition = "enforce" | "report";
|
|
11293
11417
|
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
|
|
11294
11418
|
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
|
11419
|
+
type TaskPriority = "background" | "user-blocking" | "user-visible";
|
|
11295
11420
|
type TransferFunction = "hlg" | "pq" | "srgb";
|
|
11296
11421
|
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
|
|
11297
11422
|
type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
|
package/ts5.6/index.d.ts
CHANGED
|
@@ -584,6 +584,12 @@ interface RsaPssParams extends Algorithm {
|
|
|
584
584
|
saltLength: number;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
+
interface SchedulerPostTaskOptions {
|
|
588
|
+
delay?: number;
|
|
589
|
+
priority?: TaskPriority;
|
|
590
|
+
signal?: AbortSignal;
|
|
591
|
+
}
|
|
592
|
+
|
|
587
593
|
interface SecurityPolicyViolationEventInit extends EventInit {
|
|
588
594
|
blockedURI?: string;
|
|
589
595
|
columnNumber?: number;
|
|
@@ -632,6 +638,18 @@ interface StructuredSerializeOptions {
|
|
|
632
638
|
transfer?: Transferable[];
|
|
633
639
|
}
|
|
634
640
|
|
|
641
|
+
interface TaskControllerInit {
|
|
642
|
+
priority?: TaskPriority;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
interface TaskPriorityChangeEventInit extends EventInit {
|
|
646
|
+
previousPriority: TaskPriority;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
interface TaskSignalAnyInit {
|
|
650
|
+
priority?: TaskPriority | TaskSignal;
|
|
651
|
+
}
|
|
652
|
+
|
|
635
653
|
interface TextDecodeOptions {
|
|
636
654
|
stream?: boolean;
|
|
637
655
|
}
|
|
@@ -6381,6 +6399,31 @@ declare var Response: {
|
|
|
6381
6399
|
redirect(url: string | URL, status?: number): Response;
|
|
6382
6400
|
};
|
|
6383
6401
|
|
|
6402
|
+
/**
|
|
6403
|
+
* The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
|
|
6404
|
+
*
|
|
6405
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
|
|
6406
|
+
*/
|
|
6407
|
+
interface Scheduler {
|
|
6408
|
+
/**
|
|
6409
|
+
* The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
|
|
6410
|
+
*
|
|
6411
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
|
|
6412
|
+
*/
|
|
6413
|
+
postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
|
|
6414
|
+
/**
|
|
6415
|
+
* 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).
|
|
6416
|
+
*
|
|
6417
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
|
|
6418
|
+
*/
|
|
6419
|
+
yield(): Promise<void>;
|
|
6420
|
+
}
|
|
6421
|
+
|
|
6422
|
+
declare var Scheduler: {
|
|
6423
|
+
prototype: Scheduler;
|
|
6424
|
+
new(): Scheduler;
|
|
6425
|
+
};
|
|
6426
|
+
|
|
6384
6427
|
/**
|
|
6385
6428
|
* 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.
|
|
6386
6429
|
*
|
|
@@ -6862,6 +6905,79 @@ declare var SubtleCrypto: {
|
|
|
6862
6905
|
new(): SubtleCrypto;
|
|
6863
6906
|
};
|
|
6864
6907
|
|
|
6908
|
+
/**
|
|
6909
|
+
* 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.
|
|
6910
|
+
*
|
|
6911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
|
|
6912
|
+
*/
|
|
6913
|
+
interface TaskController extends AbortController {
|
|
6914
|
+
/**
|
|
6915
|
+
* The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
|
|
6916
|
+
*
|
|
6917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
|
|
6918
|
+
*/
|
|
6919
|
+
setPriority(priority: TaskPriority): void;
|
|
6920
|
+
}
|
|
6921
|
+
|
|
6922
|
+
declare var TaskController: {
|
|
6923
|
+
prototype: TaskController;
|
|
6924
|
+
new(init?: TaskControllerInit): TaskController;
|
|
6925
|
+
};
|
|
6926
|
+
|
|
6927
|
+
/**
|
|
6928
|
+
* The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
|
|
6929
|
+
*
|
|
6930
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
|
|
6931
|
+
*/
|
|
6932
|
+
interface TaskPriorityChangeEvent extends Event {
|
|
6933
|
+
/**
|
|
6934
|
+
* 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.
|
|
6935
|
+
*
|
|
6936
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
|
|
6937
|
+
*/
|
|
6938
|
+
readonly previousPriority: TaskPriority;
|
|
6939
|
+
}
|
|
6940
|
+
|
|
6941
|
+
declare var TaskPriorityChangeEvent: {
|
|
6942
|
+
prototype: TaskPriorityChangeEvent;
|
|
6943
|
+
new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
|
|
6944
|
+
};
|
|
6945
|
+
|
|
6946
|
+
interface TaskSignalEventMap extends AbortSignalEventMap {
|
|
6947
|
+
"prioritychange": TaskPriorityChangeEvent;
|
|
6948
|
+
}
|
|
6949
|
+
|
|
6950
|
+
/**
|
|
6951
|
+
* 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.
|
|
6952
|
+
*
|
|
6953
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
|
|
6954
|
+
*/
|
|
6955
|
+
interface TaskSignal extends AbortSignal {
|
|
6956
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
|
|
6957
|
+
onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
|
|
6958
|
+
/**
|
|
6959
|
+
* The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
|
|
6960
|
+
*
|
|
6961
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
|
|
6962
|
+
*/
|
|
6963
|
+
readonly priority: TaskPriority;
|
|
6964
|
+
addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
6965
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
6966
|
+
removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
6967
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
declare var TaskSignal: {
|
|
6971
|
+
prototype: TaskSignal;
|
|
6972
|
+
new(): TaskSignal;
|
|
6973
|
+
/**
|
|
6974
|
+
* The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
|
|
6975
|
+
*
|
|
6976
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
|
|
6977
|
+
*/
|
|
6978
|
+
any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
|
|
6979
|
+
};
|
|
6980
|
+
|
|
6865
6981
|
/**
|
|
6866
6982
|
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
|
|
6867
6983
|
*
|
|
@@ -7210,7 +7326,7 @@ declare var URL: {
|
|
|
7210
7326
|
*/
|
|
7211
7327
|
canParse(url: string | URL, base?: string | URL): boolean;
|
|
7212
7328
|
/**
|
|
7213
|
-
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL
|
|
7329
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
7214
7330
|
*
|
|
7215
7331
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
7216
7332
|
*/
|
|
@@ -10139,6 +10255,8 @@ interface WindowOrWorkerGlobalScope {
|
|
|
10139
10255
|
readonly origin: string;
|
|
10140
10256
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
|
|
10141
10257
|
readonly performance: Performance;
|
|
10258
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
10259
|
+
readonly scheduler: Scheduler;
|
|
10142
10260
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
|
|
10143
10261
|
atob(data: string): string;
|
|
10144
10262
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
|
|
@@ -11028,6 +11146,10 @@ interface ReportingObserverCallback {
|
|
|
11028
11146
|
(reports: Report[], observer: ReportingObserver): void;
|
|
11029
11147
|
}
|
|
11030
11148
|
|
|
11149
|
+
interface SchedulerPostTaskCallback {
|
|
11150
|
+
(): any;
|
|
11151
|
+
}
|
|
11152
|
+
|
|
11031
11153
|
interface TransformerFlushCallback<O> {
|
|
11032
11154
|
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
11033
11155
|
}
|
|
@@ -11154,6 +11276,8 @@ declare var isSecureContext: boolean;
|
|
|
11154
11276
|
declare var origin: string;
|
|
11155
11277
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
|
|
11156
11278
|
declare var performance: Performance;
|
|
11279
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
11280
|
+
declare var scheduler: Scheduler;
|
|
11157
11281
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
|
|
11158
11282
|
declare function atob(data: string): string;
|
|
11159
11283
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
|
|
@@ -11292,6 +11416,7 @@ type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaquer
|
|
|
11292
11416
|
type SecurityPolicyViolationEventDisposition = "enforce" | "report";
|
|
11293
11417
|
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
|
|
11294
11418
|
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
|
11419
|
+
type TaskPriority = "background" | "user-blocking" | "user-visible";
|
|
11295
11420
|
type TransferFunction = "hlg" | "pq" | "srgb";
|
|
11296
11421
|
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
|
|
11297
11422
|
type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
|