@types/serviceworker 0.0.47 → 0.0.50
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 +69 -21
- 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.50 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.50.
|
package/index.d.ts
CHANGED
|
@@ -466,9 +466,18 @@ interface QueuingStrategyInit {
|
|
|
466
466
|
highWaterMark: number;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
interface
|
|
469
|
+
interface ReadableStreamGetReaderOptions {
|
|
470
|
+
/**
|
|
471
|
+
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
472
|
+
*
|
|
473
|
+
* This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.
|
|
474
|
+
*/
|
|
475
|
+
mode?: ReadableStreamReaderMode;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
interface ReadableStreamReadDoneResult<T> {
|
|
470
479
|
done: true;
|
|
471
|
-
value?:
|
|
480
|
+
value?: T;
|
|
472
481
|
}
|
|
473
482
|
|
|
474
483
|
interface ReadableStreamReadValueResult<T> {
|
|
@@ -624,6 +633,21 @@ interface Transformer<I = any, O = any> {
|
|
|
624
633
|
writableType?: undefined;
|
|
625
634
|
}
|
|
626
635
|
|
|
636
|
+
interface UnderlyingByteSource {
|
|
637
|
+
autoAllocateChunkSize?: number;
|
|
638
|
+
cancel?: UnderlyingSourceCancelCallback;
|
|
639
|
+
pull?: (controller: ReadableByteStreamController) => void | PromiseLike<void>;
|
|
640
|
+
start?: (controller: ReadableByteStreamController) => any;
|
|
641
|
+
type: "bytes";
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
interface UnderlyingDefaultSource<R = any> {
|
|
645
|
+
cancel?: UnderlyingSourceCancelCallback;
|
|
646
|
+
pull?: (controller: ReadableStreamDefaultController<R>) => void | PromiseLike<void>;
|
|
647
|
+
start?: (controller: ReadableStreamDefaultController<R>) => any;
|
|
648
|
+
type?: undefined;
|
|
649
|
+
}
|
|
650
|
+
|
|
627
651
|
interface UnderlyingSink<W = any> {
|
|
628
652
|
abort?: UnderlyingSinkAbortCallback;
|
|
629
653
|
close?: UnderlyingSinkCloseCallback;
|
|
@@ -633,10 +657,11 @@ interface UnderlyingSink<W = any> {
|
|
|
633
657
|
}
|
|
634
658
|
|
|
635
659
|
interface UnderlyingSource<R = any> {
|
|
660
|
+
autoAllocateChunkSize?: number;
|
|
636
661
|
cancel?: UnderlyingSourceCancelCallback;
|
|
637
662
|
pull?: UnderlyingSourcePullCallback<R>;
|
|
638
663
|
start?: UnderlyingSourceStartCallback<R>;
|
|
639
|
-
type?:
|
|
664
|
+
type?: ReadableStreamType;
|
|
640
665
|
}
|
|
641
666
|
|
|
642
667
|
interface VideoConfiguration {
|
|
@@ -709,6 +734,7 @@ declare var AbortSignal: {
|
|
|
709
734
|
prototype: AbortSignal;
|
|
710
735
|
new(): AbortSignal;
|
|
711
736
|
// abort(reason?: any): AbortSignal; - To be re-added in the future
|
|
737
|
+
timeout(milliseconds: number): AbortSignal;
|
|
712
738
|
};
|
|
713
739
|
|
|
714
740
|
interface AbstractWorkerEventMap {
|
|
@@ -1237,6 +1263,13 @@ interface EXT_sRGB {
|
|
|
1237
1263
|
interface EXT_shader_texture_lod {
|
|
1238
1264
|
}
|
|
1239
1265
|
|
|
1266
|
+
interface EXT_texture_compression_bptc {
|
|
1267
|
+
readonly COMPRESSED_RGBA_BPTC_UNORM_EXT: GLenum;
|
|
1268
|
+
readonly COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT: GLenum;
|
|
1269
|
+
readonly COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT: GLenum;
|
|
1270
|
+
readonly COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT: GLenum;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1240
1273
|
interface EXT_texture_compression_rgtc {
|
|
1241
1274
|
readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum;
|
|
1242
1275
|
readonly COMPRESSED_RED_RGTC1_EXT: GLenum;
|
|
@@ -2460,6 +2493,7 @@ interface PermissionStatusEventMap {
|
|
|
2460
2493
|
}
|
|
2461
2494
|
|
|
2462
2495
|
interface PermissionStatus extends EventTarget {
|
|
2496
|
+
readonly name: string;
|
|
2463
2497
|
onchange: ((this: PermissionStatus, ev: Event) => any) | null;
|
|
2464
2498
|
readonly state: PermissionState;
|
|
2465
2499
|
addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -2571,6 +2605,7 @@ declare var PushSubscription: {
|
|
|
2571
2605
|
/** Available only in secure contexts. */
|
|
2572
2606
|
interface PushSubscriptionOptions {
|
|
2573
2607
|
readonly applicationServerKey: ArrayBuffer | null;
|
|
2608
|
+
readonly userVisibleOnly: boolean;
|
|
2574
2609
|
}
|
|
2575
2610
|
|
|
2576
2611
|
declare var PushSubscriptionOptions: {
|
|
@@ -2595,7 +2630,9 @@ declare var ReadableByteStreamController: {
|
|
|
2595
2630
|
interface ReadableStream<R = any> {
|
|
2596
2631
|
readonly locked: boolean;
|
|
2597
2632
|
cancel(reason?: any): Promise<void>;
|
|
2633
|
+
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
|
|
2598
2634
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2635
|
+
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
|
|
2599
2636
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
2600
2637
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
2601
2638
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
@@ -2603,11 +2640,13 @@ interface ReadableStream<R = any> {
|
|
|
2603
2640
|
|
|
2604
2641
|
declare var ReadableStream: {
|
|
2605
2642
|
prototype: ReadableStream;
|
|
2643
|
+
new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream<Uint8Array>;
|
|
2644
|
+
new<R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
2606
2645
|
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
2607
2646
|
};
|
|
2608
2647
|
|
|
2609
2648
|
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
2610
|
-
read(view:
|
|
2649
|
+
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
2611
2650
|
releaseLock(): void;
|
|
2612
2651
|
}
|
|
2613
2652
|
|
|
@@ -2795,6 +2834,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
|
|
|
2795
2834
|
"notificationclick": NotificationEvent;
|
|
2796
2835
|
"notificationclose": NotificationEvent;
|
|
2797
2836
|
"push": PushEvent;
|
|
2837
|
+
"pushsubscriptionchange": Event;
|
|
2798
2838
|
}
|
|
2799
2839
|
|
|
2800
2840
|
/** This ServiceWorker API interface represents the global execution context of a service worker. */
|
|
@@ -2808,6 +2848,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
2808
2848
|
onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
|
|
2809
2849
|
onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
|
|
2810
2850
|
onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
2851
|
+
onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: Event) => any) | null;
|
|
2811
2852
|
readonly registration: ServiceWorkerRegistration;
|
|
2812
2853
|
readonly serviceWorker: ServiceWorker;
|
|
2813
2854
|
skipWaiting(): Promise<void>;
|
|
@@ -2871,11 +2912,11 @@ declare var StorageManager: {
|
|
|
2871
2912
|
* Available only in secure contexts.
|
|
2872
2913
|
*/
|
|
2873
2914
|
interface SubtleCrypto {
|
|
2874
|
-
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<
|
|
2915
|
+
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
2875
2916
|
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
|
2876
2917
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
2877
2918
|
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
|
|
2878
|
-
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<
|
|
2919
|
+
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
2879
2920
|
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
2880
2921
|
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
|
2881
2922
|
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
@@ -4587,35 +4628,39 @@ interface WebGLRenderingContextBase {
|
|
|
4587
4628
|
getBufferParameter(target: GLenum, pname: GLenum): any;
|
|
4588
4629
|
getContextAttributes(): WebGLContextAttributes | null;
|
|
4589
4630
|
getError(): GLenum;
|
|
4631
|
+
getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
|
|
4590
4632
|
getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
|
|
4591
4633
|
getExtension(extensionName: "EXT_color_buffer_float"): EXT_color_buffer_float | null;
|
|
4592
4634
|
getExtension(extensionName: "EXT_color_buffer_half_float"): EXT_color_buffer_half_float | null;
|
|
4593
4635
|
getExtension(extensionName: "EXT_float_blend"): EXT_float_blend | null;
|
|
4594
|
-
getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
|
|
4595
4636
|
getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
|
|
4596
|
-
getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
|
|
4597
4637
|
getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
|
|
4638
|
+
getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
|
|
4639
|
+
getExtension(extensionName: "EXT_texture_compression_bptc"): EXT_texture_compression_bptc | null;
|
|
4640
|
+
getExtension(extensionName: "EXT_texture_compression_rgtc"): EXT_texture_compression_rgtc | null;
|
|
4641
|
+
getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
|
|
4598
4642
|
getExtension(extensionName: "KHR_parallel_shader_compile"): KHR_parallel_shader_compile | null;
|
|
4643
|
+
getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
|
|
4644
|
+
getExtension(extensionName: "OES_fbo_render_mipmap"): OES_fbo_render_mipmap | null;
|
|
4645
|
+
getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
|
|
4646
|
+
getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
|
|
4647
|
+
getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
|
|
4648
|
+
getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
|
|
4649
|
+
getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
|
|
4599
4650
|
getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
|
|
4600
4651
|
getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null;
|
|
4601
4652
|
getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
|
|
4602
4653
|
getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
|
|
4603
4654
|
getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null;
|
|
4604
4655
|
getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
|
|
4656
|
+
getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
|
|
4605
4657
|
getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
|
|
4658
|
+
getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
|
|
4606
4659
|
getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
|
|
4660
|
+
getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
|
|
4607
4661
|
getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
|
|
4608
4662
|
getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
|
|
4609
|
-
getExtension(extensionName: "
|
|
4610
|
-
getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
|
|
4611
|
-
getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
|
|
4612
|
-
getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
|
|
4613
|
-
getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
|
|
4614
|
-
getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
|
|
4615
|
-
getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
|
|
4616
|
-
getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
|
|
4617
|
-
getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
|
|
4618
|
-
getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
|
|
4663
|
+
getExtension(extensionName: "WEBGL_multi_draw"): WEBGL_multi_draw | null;
|
|
4619
4664
|
getExtension(name: string): any;
|
|
4620
4665
|
getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
|
|
4621
4666
|
getParameter(pname: GLenum): any;
|
|
@@ -5493,6 +5538,7 @@ declare var onmessageerror: ((this: ServiceWorkerGlobalScope, ev: MessageEvent)
|
|
|
5493
5538
|
declare var onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
|
|
5494
5539
|
declare var onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
|
|
5495
5540
|
declare var onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
5541
|
+
declare var onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: Event) => any) | null;
|
|
5496
5542
|
declare var registration: ServiceWorkerRegistration;
|
|
5497
5543
|
declare var serviceWorker: ServiceWorker;
|
|
5498
5544
|
declare function skipWaiting(): Promise<void>;
|
|
@@ -5573,9 +5619,9 @@ type NamedCurve = string;
|
|
|
5573
5619
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
5574
5620
|
type PerformanceEntryList = PerformanceEntry[];
|
|
5575
5621
|
type PushMessageDataInit = BufferSource | string;
|
|
5576
|
-
type ReadableStreamController<T> = ReadableStreamDefaultController<T
|
|
5577
|
-
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult
|
|
5578
|
-
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T
|
|
5622
|
+
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
5623
|
+
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
|
5624
|
+
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
|
5579
5625
|
type RequestInfo = Request | string;
|
|
5580
5626
|
type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
5581
5627
|
type TimerHandler = string | Function;
|
|
@@ -5612,6 +5658,8 @@ type PermissionState = "denied" | "granted" | "prompt";
|
|
|
5612
5658
|
type PredefinedColorSpace = "display-p3" | "srgb";
|
|
5613
5659
|
type PremultiplyAlpha = "default" | "none" | "premultiply";
|
|
5614
5660
|
type PushEncryptionKeyName = "auth" | "p256dh";
|
|
5661
|
+
type ReadableStreamReaderMode = "byob";
|
|
5662
|
+
type ReadableStreamType = "bytes";
|
|
5615
5663
|
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
5616
5664
|
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
|
|
5617
5665
|
type RequestCredentials = "include" | "omit" | "same-origin";
|