@types/webworker 0.0.24 → 0.0.26
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 +2 -2
- package/index.d.ts +17 -31
- package/package.json +1 -1
- package/ts5.5/index.d.ts +17 -31
- package/ts5.6/index.d.ts +17 -31
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> The Worker interface of the Web Workers API represents a background task that can be created via script, which can send messages back to its creator. Creating a worker is done by calling the `Worker("path/to/worker/script")` constructor.
|
|
4
4
|
|
|
5
|
-
From [MDN Web Docs: Worker API](https://developer.mozilla.org/
|
|
5
|
+
From [MDN Web Docs: Worker API](https://developer.mozilla.org/docs/Web/API/Worker)
|
|
6
6
|
|
|
7
7
|
This package contains type definitions which will set up the global environment for your TypeScript project to match the runtime environment of a Web Worker. The APIs inside `@types/webworker` are [generated from](https://github.com/microsoft/TypeScript-DOM-lib-generator/) the specifications for JavaScript.
|
|
8
8
|
|
|
@@ -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.
|
|
48
|
+
You can read what changed in version 0.0.26 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.26.
|
package/index.d.ts
CHANGED
|
@@ -620,7 +620,7 @@ interface PromiseRejectionEventInit extends EventInit {
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
interface PushEventInit extends ExtendableEventInit {
|
|
623
|
-
data?: PushMessageDataInit;
|
|
623
|
+
data?: PushMessageDataInit | null;
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
|
|
@@ -4661,6 +4661,12 @@ interface FontFace {
|
|
|
4661
4661
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange)
|
|
4662
4662
|
*/
|
|
4663
4663
|
unicodeRange: string;
|
|
4664
|
+
/**
|
|
4665
|
+
* The **`variationSettings`** property of the FontFace interface retrieves or sets low-level OpenType or TrueType font variations.
|
|
4666
|
+
*
|
|
4667
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/variationSettings)
|
|
4668
|
+
*/
|
|
4669
|
+
variationSettings: string;
|
|
4664
4670
|
/**
|
|
4665
4671
|
* The **`weight`** property of the FontFace interface retrieves or sets the weight of the font.
|
|
4666
4672
|
*
|
|
@@ -5856,8 +5862,8 @@ interface LockManager {
|
|
|
5856
5862
|
*
|
|
5857
5863
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager/request)
|
|
5858
5864
|
*/
|
|
5859
|
-
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<T
|
|
5860
|
-
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<T
|
|
5865
|
+
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
|
5866
|
+
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
|
5861
5867
|
}
|
|
5862
5868
|
|
|
5863
5869
|
declare var LockManager: {
|
|
@@ -6101,35 +6107,15 @@ interface NavigatorConcurrentHardware {
|
|
|
6101
6107
|
}
|
|
6102
6108
|
|
|
6103
6109
|
interface NavigatorID {
|
|
6104
|
-
/**
|
|
6105
|
-
* @deprecated
|
|
6106
|
-
*
|
|
6107
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appCodeName)
|
|
6108
|
-
*/
|
|
6110
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appCodeName) */
|
|
6109
6111
|
readonly appCodeName: string;
|
|
6110
|
-
/**
|
|
6111
|
-
* @deprecated
|
|
6112
|
-
*
|
|
6113
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appName)
|
|
6114
|
-
*/
|
|
6112
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appName) */
|
|
6115
6113
|
readonly appName: string;
|
|
6116
|
-
/**
|
|
6117
|
-
* @deprecated
|
|
6118
|
-
*
|
|
6119
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appVersion)
|
|
6120
|
-
*/
|
|
6114
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appVersion) */
|
|
6121
6115
|
readonly appVersion: string;
|
|
6122
|
-
/**
|
|
6123
|
-
* @deprecated
|
|
6124
|
-
*
|
|
6125
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/platform)
|
|
6126
|
-
*/
|
|
6116
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/platform) */
|
|
6127
6117
|
readonly platform: string;
|
|
6128
|
-
/**
|
|
6129
|
-
* @deprecated
|
|
6130
|
-
*
|
|
6131
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/product)
|
|
6132
|
-
*/
|
|
6118
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/product) */
|
|
6133
6119
|
readonly product: string;
|
|
6134
6120
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/userAgent) */
|
|
6135
6121
|
readonly userAgent: string;
|
|
@@ -7515,7 +7501,7 @@ interface ReadableByteStreamController {
|
|
|
7515
7501
|
*/
|
|
7516
7502
|
close(): void;
|
|
7517
7503
|
/**
|
|
7518
|
-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is
|
|
7504
|
+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
|
|
7519
7505
|
*
|
|
7520
7506
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
7521
7507
|
*/
|
|
@@ -9018,7 +9004,7 @@ interface URLPattern {
|
|
|
9018
9004
|
*/
|
|
9019
9005
|
exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
|
|
9020
9006
|
/**
|
|
9021
|
-
* The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
9007
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
9022
9008
|
*
|
|
9023
9009
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
9024
9010
|
*/
|
|
@@ -11923,7 +11909,7 @@ interface WebSocket extends EventTarget {
|
|
|
11923
11909
|
*
|
|
11924
11910
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
11925
11911
|
*/
|
|
11926
|
-
readonly readyState:
|
|
11912
|
+
readonly readyState: 0 | 1 | 2 | 3;
|
|
11927
11913
|
/**
|
|
11928
11914
|
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
11929
11915
|
*
|
package/package.json
CHANGED
package/ts5.5/index.d.ts
CHANGED
|
@@ -620,7 +620,7 @@ interface PromiseRejectionEventInit extends EventInit {
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
interface PushEventInit extends ExtendableEventInit {
|
|
623
|
-
data?: PushMessageDataInit;
|
|
623
|
+
data?: PushMessageDataInit | null;
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
|
|
@@ -4661,6 +4661,12 @@ interface FontFace {
|
|
|
4661
4661
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange)
|
|
4662
4662
|
*/
|
|
4663
4663
|
unicodeRange: string;
|
|
4664
|
+
/**
|
|
4665
|
+
* The **`variationSettings`** property of the FontFace interface retrieves or sets low-level OpenType or TrueType font variations.
|
|
4666
|
+
*
|
|
4667
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/variationSettings)
|
|
4668
|
+
*/
|
|
4669
|
+
variationSettings: string;
|
|
4664
4670
|
/**
|
|
4665
4671
|
* The **`weight`** property of the FontFace interface retrieves or sets the weight of the font.
|
|
4666
4672
|
*
|
|
@@ -5856,8 +5862,8 @@ interface LockManager {
|
|
|
5856
5862
|
*
|
|
5857
5863
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager/request)
|
|
5858
5864
|
*/
|
|
5859
|
-
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<T
|
|
5860
|
-
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<T
|
|
5865
|
+
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
|
5866
|
+
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
|
5861
5867
|
}
|
|
5862
5868
|
|
|
5863
5869
|
declare var LockManager: {
|
|
@@ -6101,35 +6107,15 @@ interface NavigatorConcurrentHardware {
|
|
|
6101
6107
|
}
|
|
6102
6108
|
|
|
6103
6109
|
interface NavigatorID {
|
|
6104
|
-
/**
|
|
6105
|
-
* @deprecated
|
|
6106
|
-
*
|
|
6107
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appCodeName)
|
|
6108
|
-
*/
|
|
6110
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appCodeName) */
|
|
6109
6111
|
readonly appCodeName: string;
|
|
6110
|
-
/**
|
|
6111
|
-
* @deprecated
|
|
6112
|
-
*
|
|
6113
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appName)
|
|
6114
|
-
*/
|
|
6112
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appName) */
|
|
6115
6113
|
readonly appName: string;
|
|
6116
|
-
/**
|
|
6117
|
-
* @deprecated
|
|
6118
|
-
*
|
|
6119
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appVersion)
|
|
6120
|
-
*/
|
|
6114
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appVersion) */
|
|
6121
6115
|
readonly appVersion: string;
|
|
6122
|
-
/**
|
|
6123
|
-
* @deprecated
|
|
6124
|
-
*
|
|
6125
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/platform)
|
|
6126
|
-
*/
|
|
6116
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/platform) */
|
|
6127
6117
|
readonly platform: string;
|
|
6128
|
-
/**
|
|
6129
|
-
* @deprecated
|
|
6130
|
-
*
|
|
6131
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/product)
|
|
6132
|
-
*/
|
|
6118
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/product) */
|
|
6133
6119
|
readonly product: string;
|
|
6134
6120
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/userAgent) */
|
|
6135
6121
|
readonly userAgent: string;
|
|
@@ -7515,7 +7501,7 @@ interface ReadableByteStreamController {
|
|
|
7515
7501
|
*/
|
|
7516
7502
|
close(): void;
|
|
7517
7503
|
/**
|
|
7518
|
-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is
|
|
7504
|
+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
|
|
7519
7505
|
*
|
|
7520
7506
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
7521
7507
|
*/
|
|
@@ -9018,7 +9004,7 @@ interface URLPattern {
|
|
|
9018
9004
|
*/
|
|
9019
9005
|
exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
|
|
9020
9006
|
/**
|
|
9021
|
-
* The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
9007
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
9022
9008
|
*
|
|
9023
9009
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
9024
9010
|
*/
|
|
@@ -11923,7 +11909,7 @@ interface WebSocket extends EventTarget {
|
|
|
11923
11909
|
*
|
|
11924
11910
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
11925
11911
|
*/
|
|
11926
|
-
readonly readyState:
|
|
11912
|
+
readonly readyState: 0 | 1 | 2 | 3;
|
|
11927
11913
|
/**
|
|
11928
11914
|
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
11929
11915
|
*
|
package/ts5.6/index.d.ts
CHANGED
|
@@ -620,7 +620,7 @@ interface PromiseRejectionEventInit extends EventInit {
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
interface PushEventInit extends ExtendableEventInit {
|
|
623
|
-
data?: PushMessageDataInit;
|
|
623
|
+
data?: PushMessageDataInit | null;
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
|
|
@@ -4661,6 +4661,12 @@ interface FontFace {
|
|
|
4661
4661
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange)
|
|
4662
4662
|
*/
|
|
4663
4663
|
unicodeRange: string;
|
|
4664
|
+
/**
|
|
4665
|
+
* The **`variationSettings`** property of the FontFace interface retrieves or sets low-level OpenType or TrueType font variations.
|
|
4666
|
+
*
|
|
4667
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/variationSettings)
|
|
4668
|
+
*/
|
|
4669
|
+
variationSettings: string;
|
|
4664
4670
|
/**
|
|
4665
4671
|
* The **`weight`** property of the FontFace interface retrieves or sets the weight of the font.
|
|
4666
4672
|
*
|
|
@@ -5856,8 +5862,8 @@ interface LockManager {
|
|
|
5856
5862
|
*
|
|
5857
5863
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager/request)
|
|
5858
5864
|
*/
|
|
5859
|
-
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<T
|
|
5860
|
-
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<T
|
|
5865
|
+
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
|
5866
|
+
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
|
5861
5867
|
}
|
|
5862
5868
|
|
|
5863
5869
|
declare var LockManager: {
|
|
@@ -6101,35 +6107,15 @@ interface NavigatorConcurrentHardware {
|
|
|
6101
6107
|
}
|
|
6102
6108
|
|
|
6103
6109
|
interface NavigatorID {
|
|
6104
|
-
/**
|
|
6105
|
-
* @deprecated
|
|
6106
|
-
*
|
|
6107
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appCodeName)
|
|
6108
|
-
*/
|
|
6110
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appCodeName) */
|
|
6109
6111
|
readonly appCodeName: string;
|
|
6110
|
-
/**
|
|
6111
|
-
* @deprecated
|
|
6112
|
-
*
|
|
6113
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appName)
|
|
6114
|
-
*/
|
|
6112
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appName) */
|
|
6115
6113
|
readonly appName: string;
|
|
6116
|
-
/**
|
|
6117
|
-
* @deprecated
|
|
6118
|
-
*
|
|
6119
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appVersion)
|
|
6120
|
-
*/
|
|
6114
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appVersion) */
|
|
6121
6115
|
readonly appVersion: string;
|
|
6122
|
-
/**
|
|
6123
|
-
* @deprecated
|
|
6124
|
-
*
|
|
6125
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/platform)
|
|
6126
|
-
*/
|
|
6116
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/platform) */
|
|
6127
6117
|
readonly platform: string;
|
|
6128
|
-
/**
|
|
6129
|
-
* @deprecated
|
|
6130
|
-
*
|
|
6131
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/product)
|
|
6132
|
-
*/
|
|
6118
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/product) */
|
|
6133
6119
|
readonly product: string;
|
|
6134
6120
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/userAgent) */
|
|
6135
6121
|
readonly userAgent: string;
|
|
@@ -7515,7 +7501,7 @@ interface ReadableByteStreamController {
|
|
|
7515
7501
|
*/
|
|
7516
7502
|
close(): void;
|
|
7517
7503
|
/**
|
|
7518
|
-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is
|
|
7504
|
+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
|
|
7519
7505
|
*
|
|
7520
7506
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
7521
7507
|
*/
|
|
@@ -9018,7 +9004,7 @@ interface URLPattern {
|
|
|
9018
9004
|
*/
|
|
9019
9005
|
exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
|
|
9020
9006
|
/**
|
|
9021
|
-
* The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
9007
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
9022
9008
|
*
|
|
9023
9009
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
9024
9010
|
*/
|
|
@@ -11923,7 +11909,7 @@ interface WebSocket extends EventTarget {
|
|
|
11923
11909
|
*
|
|
11924
11910
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
11925
11911
|
*/
|
|
11926
|
-
readonly readyState:
|
|
11912
|
+
readonly readyState: 0 | 1 | 2 | 3;
|
|
11927
11913
|
/**
|
|
11928
11914
|
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
11929
11915
|
*
|