@types/sharedworker 0.0.78 → 0.0.79
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.79 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.79.
|
package/index.d.ts
CHANGED
|
@@ -432,9 +432,18 @@ interface QueuingStrategyInit {
|
|
|
432
432
|
highWaterMark: number;
|
|
433
433
|
}
|
|
434
434
|
|
|
435
|
-
interface
|
|
435
|
+
interface ReadableStreamGetReaderOptions {
|
|
436
|
+
/**
|
|
437
|
+
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
438
|
+
*
|
|
439
|
+
* 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.
|
|
440
|
+
*/
|
|
441
|
+
mode?: ReadableStreamReaderMode;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
interface ReadableStreamReadDoneResult<T> {
|
|
436
445
|
done: true;
|
|
437
|
-
value?:
|
|
446
|
+
value?: T;
|
|
438
447
|
}
|
|
439
448
|
|
|
440
449
|
interface ReadableStreamReadValueResult<T> {
|
|
@@ -590,6 +599,21 @@ interface Transformer<I = any, O = any> {
|
|
|
590
599
|
writableType?: undefined;
|
|
591
600
|
}
|
|
592
601
|
|
|
602
|
+
interface UnderlyingByteSource {
|
|
603
|
+
autoAllocateChunkSize?: number;
|
|
604
|
+
cancel?: UnderlyingSourceCancelCallback;
|
|
605
|
+
pull?: (controller: ReadableByteStreamController) => void | PromiseLike<void>;
|
|
606
|
+
start?: (controller: ReadableByteStreamController) => any;
|
|
607
|
+
type: "bytes";
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
interface UnderlyingDefaultSource<R = any> {
|
|
611
|
+
cancel?: UnderlyingSourceCancelCallback;
|
|
612
|
+
pull?: (controller: ReadableStreamDefaultController<R>) => void | PromiseLike<void>;
|
|
613
|
+
start?: (controller: ReadableStreamDefaultController<R>) => any;
|
|
614
|
+
type?: undefined;
|
|
615
|
+
}
|
|
616
|
+
|
|
593
617
|
interface UnderlyingSink<W = any> {
|
|
594
618
|
abort?: UnderlyingSinkAbortCallback;
|
|
595
619
|
close?: UnderlyingSinkCloseCallback;
|
|
@@ -599,10 +623,11 @@ interface UnderlyingSink<W = any> {
|
|
|
599
623
|
}
|
|
600
624
|
|
|
601
625
|
interface UnderlyingSource<R = any> {
|
|
626
|
+
autoAllocateChunkSize?: number;
|
|
602
627
|
cancel?: UnderlyingSourceCancelCallback;
|
|
603
628
|
pull?: UnderlyingSourcePullCallback<R>;
|
|
604
629
|
start?: UnderlyingSourceStartCallback<R>;
|
|
605
|
-
type?:
|
|
630
|
+
type?: ReadableStreamType;
|
|
606
631
|
}
|
|
607
632
|
|
|
608
633
|
interface VideoConfiguration {
|
|
@@ -2484,7 +2509,9 @@ declare var ReadableByteStreamController: {
|
|
|
2484
2509
|
interface ReadableStream<R = any> {
|
|
2485
2510
|
readonly locked: boolean;
|
|
2486
2511
|
cancel(reason?: any): Promise<void>;
|
|
2512
|
+
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
|
|
2487
2513
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2514
|
+
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
|
|
2488
2515
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
2489
2516
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
2490
2517
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
@@ -2492,11 +2519,13 @@ interface ReadableStream<R = any> {
|
|
|
2492
2519
|
|
|
2493
2520
|
declare var ReadableStream: {
|
|
2494
2521
|
prototype: ReadableStream;
|
|
2522
|
+
new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream<Uint8Array>;
|
|
2523
|
+
new<R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
2495
2524
|
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
2496
2525
|
};
|
|
2497
2526
|
|
|
2498
2527
|
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
2499
|
-
read(view:
|
|
2528
|
+
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
2500
2529
|
releaseLock(): void;
|
|
2501
2530
|
}
|
|
2502
2531
|
|
|
@@ -5600,9 +5629,9 @@ type MessageEventSource = MessagePort | ServiceWorker;
|
|
|
5600
5629
|
type NamedCurve = string;
|
|
5601
5630
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
5602
5631
|
type PerformanceEntryList = PerformanceEntry[];
|
|
5603
|
-
type ReadableStreamController<T> = ReadableStreamDefaultController<T
|
|
5604
|
-
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult
|
|
5605
|
-
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T
|
|
5632
|
+
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
5633
|
+
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
|
5634
|
+
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
|
5606
5635
|
type RequestInfo = Request | string;
|
|
5607
5636
|
type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
5608
5637
|
type TimerHandler = string | Function;
|
|
@@ -5637,6 +5666,8 @@ type PermissionState = "denied" | "granted" | "prompt";
|
|
|
5637
5666
|
type PredefinedColorSpace = "display-p3" | "srgb";
|
|
5638
5667
|
type PremultiplyAlpha = "default" | "none" | "premultiply";
|
|
5639
5668
|
type PushEncryptionKeyName = "auth" | "p256dh";
|
|
5669
|
+
type ReadableStreamReaderMode = "byob";
|
|
5670
|
+
type ReadableStreamType = "bytes";
|
|
5640
5671
|
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
5641
5672
|
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
|
|
5642
5673
|
type RequestCredentials = "include" | "omit" | "same-origin";
|