@types/audioworklet 0.0.28 → 0.0.31
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 +71 -6
- 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.31 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Faudioworklet%400.0.31.
|
package/index.d.ts
CHANGED
|
@@ -77,9 +77,18 @@ interface QueuingStrategyInit {
|
|
|
77
77
|
highWaterMark: number;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
interface
|
|
80
|
+
interface ReadableStreamGetReaderOptions {
|
|
81
|
+
/**
|
|
82
|
+
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
83
|
+
*
|
|
84
|
+
* 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.
|
|
85
|
+
*/
|
|
86
|
+
mode?: ReadableStreamReaderMode;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface ReadableStreamReadDoneResult<T> {
|
|
81
90
|
done: true;
|
|
82
|
-
value?:
|
|
91
|
+
value?: T;
|
|
83
92
|
}
|
|
84
93
|
|
|
85
94
|
interface ReadableStreamReadValueResult<T> {
|
|
@@ -147,6 +156,21 @@ interface Transformer<I = any, O = any> {
|
|
|
147
156
|
writableType?: undefined;
|
|
148
157
|
}
|
|
149
158
|
|
|
159
|
+
interface UnderlyingByteSource {
|
|
160
|
+
autoAllocateChunkSize?: number;
|
|
161
|
+
cancel?: UnderlyingSourceCancelCallback;
|
|
162
|
+
pull?: (controller: ReadableByteStreamController) => void | PromiseLike<void>;
|
|
163
|
+
start?: (controller: ReadableByteStreamController) => any;
|
|
164
|
+
type: "bytes";
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
interface UnderlyingDefaultSource<R = any> {
|
|
168
|
+
cancel?: UnderlyingSourceCancelCallback;
|
|
169
|
+
pull?: (controller: ReadableStreamDefaultController<R>) => void | PromiseLike<void>;
|
|
170
|
+
start?: (controller: ReadableStreamDefaultController<R>) => any;
|
|
171
|
+
type?: undefined;
|
|
172
|
+
}
|
|
173
|
+
|
|
150
174
|
interface UnderlyingSink<W = any> {
|
|
151
175
|
abort?: UnderlyingSinkAbortCallback;
|
|
152
176
|
close?: UnderlyingSinkCloseCallback;
|
|
@@ -156,10 +180,11 @@ interface UnderlyingSink<W = any> {
|
|
|
156
180
|
}
|
|
157
181
|
|
|
158
182
|
interface UnderlyingSource<R = any> {
|
|
183
|
+
autoAllocateChunkSize?: number;
|
|
159
184
|
cancel?: UnderlyingSourceCancelCallback;
|
|
160
185
|
pull?: UnderlyingSourcePullCallback<R>;
|
|
161
186
|
start?: UnderlyingSourceStartCallback<R>;
|
|
162
|
-
type?:
|
|
187
|
+
type?: ReadableStreamType;
|
|
163
188
|
}
|
|
164
189
|
|
|
165
190
|
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
|
|
@@ -514,11 +539,26 @@ declare var PromiseRejectionEvent: {
|
|
|
514
539
|
new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
|
|
515
540
|
};
|
|
516
541
|
|
|
542
|
+
interface ReadableByteStreamController {
|
|
543
|
+
readonly byobRequest: ReadableStreamBYOBRequest | null;
|
|
544
|
+
readonly desiredSize: number | null;
|
|
545
|
+
close(): void;
|
|
546
|
+
enqueue(chunk: ArrayBufferView): void;
|
|
547
|
+
error(e?: any): void;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare var ReadableByteStreamController: {
|
|
551
|
+
prototype: ReadableByteStreamController;
|
|
552
|
+
new(): ReadableByteStreamController;
|
|
553
|
+
};
|
|
554
|
+
|
|
517
555
|
/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
|
|
518
556
|
interface ReadableStream<R = any> {
|
|
519
557
|
readonly locked: boolean;
|
|
520
558
|
cancel(reason?: any): Promise<void>;
|
|
559
|
+
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
|
|
521
560
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
561
|
+
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
|
|
522
562
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
523
563
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
524
564
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
@@ -526,9 +566,32 @@ interface ReadableStream<R = any> {
|
|
|
526
566
|
|
|
527
567
|
declare var ReadableStream: {
|
|
528
568
|
prototype: ReadableStream;
|
|
569
|
+
new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream<Uint8Array>;
|
|
570
|
+
new<R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
529
571
|
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
530
572
|
};
|
|
531
573
|
|
|
574
|
+
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
575
|
+
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
576
|
+
releaseLock(): void;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
declare var ReadableStreamBYOBReader: {
|
|
580
|
+
prototype: ReadableStreamBYOBReader;
|
|
581
|
+
new(stream: ReadableStream): ReadableStreamBYOBReader;
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
interface ReadableStreamBYOBRequest {
|
|
585
|
+
readonly view: ArrayBufferView | null;
|
|
586
|
+
respond(bytesWritten: number): void;
|
|
587
|
+
respondWithNewView(view: ArrayBufferView): void;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
declare var ReadableStreamBYOBRequest: {
|
|
591
|
+
prototype: ReadableStreamBYOBRequest;
|
|
592
|
+
new(): ReadableStreamBYOBRequest;
|
|
593
|
+
};
|
|
594
|
+
|
|
532
595
|
interface ReadableStreamDefaultController<R = any> {
|
|
533
596
|
readonly desiredSize: number | null;
|
|
534
597
|
close(): void;
|
|
@@ -958,7 +1021,9 @@ type DOMHighResTimeStamp = number;
|
|
|
958
1021
|
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
|
959
1022
|
type MessageEventSource = MessagePort;
|
|
960
1023
|
type PerformanceEntryList = PerformanceEntry[];
|
|
961
|
-
type ReadableStreamController<T> = ReadableStreamDefaultController<T
|
|
962
|
-
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult
|
|
963
|
-
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T
|
|
1024
|
+
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
1025
|
+
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
|
1026
|
+
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
|
964
1027
|
type Transferable = ArrayBuffer | MessagePort;
|
|
1028
|
+
type ReadableStreamReaderMode = "byob";
|
|
1029
|
+
type ReadableStreamType = "bytes";
|