@types/serviceworker 0.0.49 → 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 +38 -7
- 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 {
|
|
@@ -2605,7 +2630,9 @@ declare var ReadableByteStreamController: {
|
|
|
2605
2630
|
interface ReadableStream<R = any> {
|
|
2606
2631
|
readonly locked: boolean;
|
|
2607
2632
|
cancel(reason?: any): Promise<void>;
|
|
2633
|
+
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
|
|
2608
2634
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2635
|
+
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
|
|
2609
2636
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
2610
2637
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
2611
2638
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
@@ -2613,11 +2640,13 @@ interface ReadableStream<R = any> {
|
|
|
2613
2640
|
|
|
2614
2641
|
declare var ReadableStream: {
|
|
2615
2642
|
prototype: ReadableStream;
|
|
2643
|
+
new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream<Uint8Array>;
|
|
2644
|
+
new<R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
2616
2645
|
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
2617
2646
|
};
|
|
2618
2647
|
|
|
2619
2648
|
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
2620
|
-
read(view:
|
|
2649
|
+
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
2621
2650
|
releaseLock(): void;
|
|
2622
2651
|
}
|
|
2623
2652
|
|
|
@@ -5590,9 +5619,9 @@ type NamedCurve = string;
|
|
|
5590
5619
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
5591
5620
|
type PerformanceEntryList = PerformanceEntry[];
|
|
5592
5621
|
type PushMessageDataInit = BufferSource | string;
|
|
5593
|
-
type ReadableStreamController<T> = ReadableStreamDefaultController<T
|
|
5594
|
-
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult
|
|
5595
|
-
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;
|
|
5596
5625
|
type RequestInfo = Request | string;
|
|
5597
5626
|
type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
5598
5627
|
type TimerHandler = string | Function;
|
|
@@ -5629,6 +5658,8 @@ type PermissionState = "denied" | "granted" | "prompt";
|
|
|
5629
5658
|
type PredefinedColorSpace = "display-p3" | "srgb";
|
|
5630
5659
|
type PremultiplyAlpha = "default" | "none" | "premultiply";
|
|
5631
5660
|
type PushEncryptionKeyName = "auth" | "p256dh";
|
|
5661
|
+
type ReadableStreamReaderMode = "byob";
|
|
5662
|
+
type ReadableStreamType = "bytes";
|
|
5632
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";
|
|
5633
5664
|
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
|
|
5634
5665
|
type RequestCredentials = "include" | "omit" | "same-origin";
|