@types/sharedworker 0.0.65 → 0.0.68
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 +41 -14
- package/iterable.d.ts +3 -3
- package/package.json +1 -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.68 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.68.
|
package/index.d.ts
CHANGED
|
@@ -336,6 +336,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
|
336
336
|
cacheName?: string;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
interface NavigationPreloadState {
|
|
340
|
+
enabled?: boolean;
|
|
341
|
+
headerValue?: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
339
344
|
interface NotificationAction {
|
|
340
345
|
action: string;
|
|
341
346
|
icon?: string;
|
|
@@ -750,13 +755,13 @@ declare var ByteLengthQueuingStrategy: {
|
|
|
750
755
|
* Available only in secure contexts.
|
|
751
756
|
*/
|
|
752
757
|
interface Cache {
|
|
753
|
-
add(request: RequestInfo): Promise<void>;
|
|
758
|
+
add(request: RequestInfo | URL): Promise<void>;
|
|
754
759
|
addAll(requests: RequestInfo[]): Promise<void>;
|
|
755
|
-
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
756
|
-
keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
|
|
757
|
-
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
|
|
758
|
-
matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
|
|
759
|
-
put(request: RequestInfo, response: Response): Promise<void>;
|
|
760
|
+
delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>;
|
|
761
|
+
keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
|
|
762
|
+
match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>;
|
|
763
|
+
matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
|
|
764
|
+
put(request: RequestInfo | URL, response: Response): Promise<void>;
|
|
760
765
|
}
|
|
761
766
|
|
|
762
767
|
declare var Cache: {
|
|
@@ -772,7 +777,7 @@ interface CacheStorage {
|
|
|
772
777
|
delete(cacheName: string): Promise<boolean>;
|
|
773
778
|
has(cacheName: string): Promise<boolean>;
|
|
774
779
|
keys(): Promise<string[]>;
|
|
775
|
-
match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
|
|
780
|
+
match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
|
|
776
781
|
open(cacheName: string): Promise<Cache>;
|
|
777
782
|
}
|
|
778
783
|
|
|
@@ -1965,6 +1970,7 @@ declare var ImageBitmapRenderingContext: {
|
|
|
1965
1970
|
|
|
1966
1971
|
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
|
|
1967
1972
|
interface ImageData {
|
|
1973
|
+
readonly colorSpace: PredefinedColorSpace;
|
|
1968
1974
|
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
|
|
1969
1975
|
readonly data: Uint8ClampedArray;
|
|
1970
1976
|
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
|
|
@@ -2081,6 +2087,19 @@ declare var MessagePort: {
|
|
|
2081
2087
|
new(): MessagePort;
|
|
2082
2088
|
};
|
|
2083
2089
|
|
|
2090
|
+
/** Available only in secure contexts. */
|
|
2091
|
+
interface NavigationPreloadManager {
|
|
2092
|
+
disable(): Promise<void>;
|
|
2093
|
+
enable(): Promise<void>;
|
|
2094
|
+
getState(): Promise<NavigationPreloadState>;
|
|
2095
|
+
setHeaderValue(value: string): Promise<void>;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
declare var NavigationPreloadManager: {
|
|
2099
|
+
prototype: NavigationPreloadManager;
|
|
2100
|
+
new(): NavigationPreloadManager;
|
|
2101
|
+
};
|
|
2102
|
+
|
|
2084
2103
|
interface NavigatorConcurrentHardware {
|
|
2085
2104
|
readonly hardwareConcurrency: number;
|
|
2086
2105
|
}
|
|
@@ -2104,6 +2123,11 @@ interface NavigatorLanguage {
|
|
|
2104
2123
|
readonly languages: ReadonlyArray<string>;
|
|
2105
2124
|
}
|
|
2106
2125
|
|
|
2126
|
+
/** Available only in secure contexts. */
|
|
2127
|
+
interface NavigatorLocks {
|
|
2128
|
+
readonly locks: LockManager;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2107
2131
|
interface NavigatorNetworkInformation {
|
|
2108
2132
|
readonly connection: NetworkInformation;
|
|
2109
2133
|
}
|
|
@@ -2514,7 +2538,7 @@ interface Request extends Body {
|
|
|
2514
2538
|
|
|
2515
2539
|
declare var Request: {
|
|
2516
2540
|
prototype: Request;
|
|
2517
|
-
new(input: RequestInfo, init?: RequestInit): Request;
|
|
2541
|
+
new(input: RequestInfo | URL, init?: RequestInit): Request;
|
|
2518
2542
|
};
|
|
2519
2543
|
|
|
2520
2544
|
/** This Fetch API interface represents the response to a request. */
|
|
@@ -2624,6 +2648,7 @@ interface ServiceWorkerRegistrationEventMap {
|
|
|
2624
2648
|
interface ServiceWorkerRegistration extends EventTarget {
|
|
2625
2649
|
readonly active: ServiceWorker | null;
|
|
2626
2650
|
readonly installing: ServiceWorker | null;
|
|
2651
|
+
readonly navigationPreload: NavigationPreloadManager;
|
|
2627
2652
|
onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
|
|
2628
2653
|
readonly pushManager: PushManager;
|
|
2629
2654
|
readonly scope: string;
|
|
@@ -2689,10 +2714,10 @@ interface SubtleCrypto {
|
|
|
2689
2714
|
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
|
|
2690
2715
|
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
2691
2716
|
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
|
2692
|
-
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage
|
|
2693
|
-
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage
|
|
2717
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
2718
|
+
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
2694
2719
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
|
|
2695
|
-
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage
|
|
2720
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
2696
2721
|
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
2697
2722
|
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
2698
2723
|
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
@@ -4965,11 +4990,12 @@ interface WindowOrWorkerGlobalScope {
|
|
|
4965
4990
|
clearTimeout(id?: number): void;
|
|
4966
4991
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
4967
4992
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
4968
|
-
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
4993
|
+
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
4969
4994
|
queueMicrotask(callback: VoidFunction): void;
|
|
4970
4995
|
reportError(e: any): void;
|
|
4971
4996
|
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
4972
4997
|
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
4998
|
+
structuredClone(value: any, options?: StructuredSerializeOptions): any;
|
|
4973
4999
|
}
|
|
4974
5000
|
|
|
4975
5001
|
interface WorkerEventMap extends AbstractWorkerEventMap {
|
|
@@ -5053,7 +5079,7 @@ declare var WorkerLocation: {
|
|
|
5053
5079
|
};
|
|
5054
5080
|
|
|
5055
5081
|
/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
|
|
5056
|
-
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
|
|
5082
|
+
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
|
|
5057
5083
|
readonly mediaCapabilities: MediaCapabilities;
|
|
5058
5084
|
}
|
|
5059
5085
|
|
|
@@ -5496,11 +5522,12 @@ declare function clearInterval(id?: number): void;
|
|
|
5496
5522
|
declare function clearTimeout(id?: number): void;
|
|
5497
5523
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5498
5524
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5499
|
-
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
5525
|
+
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
5500
5526
|
declare function queueMicrotask(callback: VoidFunction): void;
|
|
5501
5527
|
declare function reportError(e: any): void;
|
|
5502
5528
|
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5503
5529
|
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5530
|
+
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
|
|
5504
5531
|
declare function addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
5505
5532
|
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
5506
5533
|
declare function removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
package/iterable.d.ts
CHANGED
|
@@ -58,10 +58,10 @@ interface MessageEvent<T = any> {
|
|
|
58
58
|
|
|
59
59
|
interface SubtleCrypto {
|
|
60
60
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
61
|
-
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage
|
|
62
|
-
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage
|
|
61
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
62
|
+
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
63
63
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
|
|
64
|
-
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage
|
|
64
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
65
65
|
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
66
66
|
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
67
67
|
}
|