@types/audioworklet 0.0.84 → 0.0.86

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.
@@ -0,0 +1,1960 @@
1
+ /// <reference path="./iterable.d.ts" />
2
+ /// <reference path="./asynciterable.d.ts" />
3
+
4
+ /////////////////////////////
5
+ /// AudioWorklet APIs
6
+ /////////////////////////////
7
+
8
+ interface AddEventListenerOptions extends EventListenerOptions {
9
+ once?: boolean;
10
+ passive?: boolean;
11
+ signal?: AbortSignal;
12
+ }
13
+
14
+ interface CustomEventInit<T = any> extends EventInit {
15
+ detail?: T;
16
+ }
17
+
18
+ interface ErrorEventInit extends EventInit {
19
+ colno?: number;
20
+ error?: any;
21
+ filename?: string;
22
+ lineno?: number;
23
+ message?: string;
24
+ }
25
+
26
+ interface EventInit {
27
+ bubbles?: boolean;
28
+ cancelable?: boolean;
29
+ composed?: boolean;
30
+ }
31
+
32
+ interface EventListenerOptions {
33
+ capture?: boolean;
34
+ }
35
+
36
+ interface MessageEventInit<T = any> extends EventInit {
37
+ data?: T;
38
+ lastEventId?: string;
39
+ origin?: string;
40
+ ports?: MessagePort[];
41
+ source?: MessageEventSource | null;
42
+ }
43
+
44
+ interface PromiseRejectionEventInit extends EventInit {
45
+ promise: Promise<any>;
46
+ reason?: any;
47
+ }
48
+
49
+ interface QueuingStrategy<T = any> {
50
+ highWaterMark?: number;
51
+ size?: QueuingStrategySize<T>;
52
+ }
53
+
54
+ interface QueuingStrategyInit {
55
+ /**
56
+ * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
57
+ *
58
+ * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
59
+ */
60
+ highWaterMark: number;
61
+ }
62
+
63
+ interface ReadableStreamGetReaderOptions {
64
+ /**
65
+ * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
66
+ *
67
+ * 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.
68
+ */
69
+ mode?: ReadableStreamReaderMode;
70
+ }
71
+
72
+ interface ReadableStreamIteratorOptions {
73
+ /**
74
+ * Asynchronously iterates over the chunks in the stream's internal queue.
75
+ *
76
+ * Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader. The lock will be released if the async iterator's return() method is called, e.g. by breaking out of the loop.
77
+ *
78
+ * By default, calling the async iterator's return() method will also cancel the stream. To prevent this, use the stream's values() method, passing true for the preventCancel option.
79
+ */
80
+ preventCancel?: boolean;
81
+ }
82
+
83
+ interface ReadableStreamReadDoneResult<T> {
84
+ done: true;
85
+ value: T | undefined;
86
+ }
87
+
88
+ interface ReadableStreamReadValueResult<T> {
89
+ done: false;
90
+ value: T;
91
+ }
92
+
93
+ interface ReadableWritablePair<R = any, W = any> {
94
+ readable: ReadableStream<R>;
95
+ /**
96
+ * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
97
+ *
98
+ * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
99
+ */
100
+ writable: WritableStream<W>;
101
+ }
102
+
103
+ interface StreamPipeOptions {
104
+ preventAbort?: boolean;
105
+ preventCancel?: boolean;
106
+ /**
107
+ * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
108
+ *
109
+ * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
110
+ *
111
+ * Errors and closures of the source and destination streams propagate as follows:
112
+ *
113
+ * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
114
+ *
115
+ * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
116
+ *
117
+ * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
118
+ *
119
+ * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
120
+ *
121
+ * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
122
+ */
123
+ preventClose?: boolean;
124
+ signal?: AbortSignal;
125
+ }
126
+
127
+ interface StructuredSerializeOptions {
128
+ transfer?: Transferable[];
129
+ }
130
+
131
+ interface TextDecodeOptions {
132
+ stream?: boolean;
133
+ }
134
+
135
+ interface TextDecoderOptions {
136
+ fatal?: boolean;
137
+ ignoreBOM?: boolean;
138
+ }
139
+
140
+ interface TextEncoderEncodeIntoResult {
141
+ read: number;
142
+ written: number;
143
+ }
144
+
145
+ interface Transformer<I = any, O = any> {
146
+ flush?: TransformerFlushCallback<O>;
147
+ readableType?: undefined;
148
+ start?: TransformerStartCallback<O>;
149
+ transform?: TransformerTransformCallback<I, O>;
150
+ writableType?: undefined;
151
+ }
152
+
153
+ interface UnderlyingByteSource {
154
+ autoAllocateChunkSize?: number;
155
+ cancel?: UnderlyingSourceCancelCallback;
156
+ pull?: (controller: ReadableByteStreamController) => void | PromiseLike<void>;
157
+ start?: (controller: ReadableByteStreamController) => any;
158
+ type: "bytes";
159
+ }
160
+
161
+ interface UnderlyingDefaultSource<R = any> {
162
+ cancel?: UnderlyingSourceCancelCallback;
163
+ pull?: (controller: ReadableStreamDefaultController<R>) => void | PromiseLike<void>;
164
+ start?: (controller: ReadableStreamDefaultController<R>) => any;
165
+ type?: undefined;
166
+ }
167
+
168
+ interface UnderlyingSink<W = any> {
169
+ abort?: UnderlyingSinkAbortCallback;
170
+ close?: UnderlyingSinkCloseCallback;
171
+ start?: UnderlyingSinkStartCallback;
172
+ type?: undefined;
173
+ write?: UnderlyingSinkWriteCallback<W>;
174
+ }
175
+
176
+ interface UnderlyingSource<R = any> {
177
+ autoAllocateChunkSize?: number;
178
+ cancel?: UnderlyingSourceCancelCallback;
179
+ pull?: UnderlyingSourcePullCallback<R>;
180
+ start?: UnderlyingSourceStartCallback<R>;
181
+ type?: ReadableStreamType;
182
+ }
183
+
184
+ /**
185
+ * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired.
186
+ *
187
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
188
+ */
189
+ interface AbortController {
190
+ /**
191
+ * The **`signal`** read-only property of the AbortController interface returns an AbortSignal object instance, which can be used to communicate with/abort an asynchronous operation as desired.
192
+ *
193
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
194
+ */
195
+ readonly signal: AbortSignal;
196
+ /**
197
+ * The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
198
+ *
199
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
200
+ */
201
+ abort(reason?: any): void;
202
+ }
203
+
204
+ declare var AbortController: {
205
+ prototype: AbortController;
206
+ new(): AbortController;
207
+ };
208
+
209
+ interface AbortSignalEventMap {
210
+ "abort": Event;
211
+ }
212
+
213
+ /**
214
+ * The **`AbortSignal`** interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object.
215
+ *
216
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
217
+ */
218
+ interface AbortSignal extends EventTarget {
219
+ /**
220
+ * The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (`true`) or not (`false`).
221
+ *
222
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
223
+ */
224
+ readonly aborted: boolean;
225
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
226
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
227
+ /**
228
+ * The **`reason`** read-only property returns a JavaScript value that indicates the abort reason.
229
+ *
230
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason)
231
+ */
232
+ readonly reason: any;
233
+ /**
234
+ * The **`throwIfAborted()`** method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing.
235
+ *
236
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
237
+ */
238
+ throwIfAborted(): void;
239
+ addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
240
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
241
+ removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
242
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
243
+ }
244
+
245
+ declare var AbortSignal: {
246
+ prototype: AbortSignal;
247
+ new(): AbortSignal;
248
+ /**
249
+ * The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event).
250
+ *
251
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
252
+ */
253
+ abort(reason?: any): AbortSignal;
254
+ /**
255
+ * The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
256
+ *
257
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
258
+ */
259
+ any(signals: AbortSignal[]): AbortSignal;
260
+ };
261
+
262
+ /**
263
+ * The **`AudioWorkletGlobalScope`** interface of the Web Audio API represents a global execution context for user-supplied code, which defines custom AudioWorkletProcessor-derived classes.
264
+ *
265
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope)
266
+ */
267
+ interface AudioWorkletGlobalScope extends WorkletGlobalScope {
268
+ /**
269
+ * The read-only **`currentFrame`** property of the AudioWorkletGlobalScope interface returns an integer that represents the ever-increasing current sample-frame of the audio block being processed.
270
+ *
271
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/currentFrame)
272
+ */
273
+ readonly currentFrame: number;
274
+ /**
275
+ * The read-only **`currentTime`** property of the AudioWorkletGlobalScope interface returns a double that represents the ever-increasing context time of the audio block being processed.
276
+ *
277
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/currentTime)
278
+ */
279
+ readonly currentTime: number;
280
+ /**
281
+ * The read-only **`sampleRate`** property of the AudioWorkletGlobalScope interface returns a float that represents the sample rate of the associated BaseAudioContext the worklet belongs to.
282
+ *
283
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/sampleRate)
284
+ */
285
+ readonly sampleRate: number;
286
+ /**
287
+ * The **`registerProcessor`** method of the AudioWorkletGlobalScope interface registers a class constructor derived from AudioWorkletProcessor interface under a specified _name_.
288
+ *
289
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/registerProcessor)
290
+ */
291
+ registerProcessor(name: string, processorCtor: AudioWorkletProcessorConstructor): void;
292
+ }
293
+
294
+ declare var AudioWorkletGlobalScope: {
295
+ prototype: AudioWorkletGlobalScope;
296
+ new(): AudioWorkletGlobalScope;
297
+ };
298
+
299
+ /**
300
+ * The **`AudioWorkletProcessor`** interface of the Web Audio API represents an audio processing code behind a custom AudioWorkletNode.
301
+ *
302
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletProcessor)
303
+ */
304
+ interface AudioWorkletProcessor {
305
+ /**
306
+ * The read-only **`port`** property of the AudioWorkletProcessor interface returns the associated MessagePort.
307
+ *
308
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletProcessor/port)
309
+ */
310
+ readonly port: MessagePort;
311
+ }
312
+
313
+ declare var AudioWorkletProcessor: {
314
+ prototype: AudioWorkletProcessor;
315
+ new(): AudioWorkletProcessor;
316
+ };
317
+
318
+ interface AudioWorkletProcessorImpl extends AudioWorkletProcessor {
319
+ process(inputs: Float32Array[][], outputs: Float32Array[][], parameters: Record<string, Float32Array>): boolean;
320
+ }
321
+
322
+ /**
323
+ * The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams.
324
+ *
325
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
326
+ */
327
+ interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
328
+ /**
329
+ * The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied.
330
+ *
331
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark)
332
+ */
333
+ readonly highWaterMark: number;
334
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
335
+ readonly size: QueuingStrategySize<ArrayBufferView>;
336
+ }
337
+
338
+ declare var ByteLengthQueuingStrategy: {
339
+ prototype: ByteLengthQueuingStrategy;
340
+ new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
341
+ };
342
+
343
+ /**
344
+ * The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.
345
+ *
346
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
347
+ */
348
+ interface CompressionStream extends GenericTransformStream {
349
+ readonly readable: ReadableStream<Uint8Array<ArrayBuffer>>;
350
+ readonly writable: WritableStream<BufferSource>;
351
+ }
352
+
353
+ declare var CompressionStream: {
354
+ prototype: CompressionStream;
355
+ new(format: CompressionFormat): CompressionStream;
356
+ };
357
+
358
+ /**
359
+ * The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams.
360
+ *
361
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
362
+ */
363
+ interface CountQueuingStrategy extends QueuingStrategy {
364
+ /**
365
+ * The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.
366
+ *
367
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark)
368
+ */
369
+ readonly highWaterMark: number;
370
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
371
+ readonly size: QueuingStrategySize;
372
+ }
373
+
374
+ declare var CountQueuingStrategy: {
375
+ prototype: CountQueuingStrategy;
376
+ new(init: QueuingStrategyInit): CountQueuingStrategy;
377
+ };
378
+
379
+ /**
380
+ * The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
381
+ *
382
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
383
+ */
384
+ interface CustomEvent<T = any> extends Event {
385
+ /**
386
+ * The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event.
387
+ *
388
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail)
389
+ */
390
+ readonly detail: T;
391
+ /**
392
+ * The **`CustomEvent.initCustomEvent()`** method initializes a CustomEvent object.
393
+ * @deprecated
394
+ *
395
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/initCustomEvent)
396
+ */
397
+ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
398
+ }
399
+
400
+ declare var CustomEvent: {
401
+ prototype: CustomEvent;
402
+ new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
403
+ };
404
+
405
+ /**
406
+ * The **`DOMException`** interface represents an abnormal event (called an **exception**) that occurs as a result of calling a method or accessing a property of a web API.
407
+ *
408
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
409
+ */
410
+ interface DOMException extends Error {
411
+ /**
412
+ * The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or `0` if none match.
413
+ * @deprecated
414
+ *
415
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
416
+ */
417
+ readonly code: number;
418
+ /**
419
+ * The **`message`** read-only property of the DOMException interface returns a string representing a message or description associated with the given error name.
420
+ *
421
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)
422
+ */
423
+ readonly message: string;
424
+ /**
425
+ * The **`name`** read-only property of the DOMException interface returns a string that contains one of the strings associated with an error name.
426
+ *
427
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)
428
+ */
429
+ readonly name: string;
430
+ readonly INDEX_SIZE_ERR: 1;
431
+ readonly DOMSTRING_SIZE_ERR: 2;
432
+ readonly HIERARCHY_REQUEST_ERR: 3;
433
+ readonly WRONG_DOCUMENT_ERR: 4;
434
+ readonly INVALID_CHARACTER_ERR: 5;
435
+ readonly NO_DATA_ALLOWED_ERR: 6;
436
+ readonly NO_MODIFICATION_ALLOWED_ERR: 7;
437
+ readonly NOT_FOUND_ERR: 8;
438
+ readonly NOT_SUPPORTED_ERR: 9;
439
+ readonly INUSE_ATTRIBUTE_ERR: 10;
440
+ readonly INVALID_STATE_ERR: 11;
441
+ readonly SYNTAX_ERR: 12;
442
+ readonly INVALID_MODIFICATION_ERR: 13;
443
+ readonly NAMESPACE_ERR: 14;
444
+ readonly INVALID_ACCESS_ERR: 15;
445
+ readonly VALIDATION_ERR: 16;
446
+ readonly TYPE_MISMATCH_ERR: 17;
447
+ readonly SECURITY_ERR: 18;
448
+ readonly NETWORK_ERR: 19;
449
+ readonly ABORT_ERR: 20;
450
+ readonly URL_MISMATCH_ERR: 21;
451
+ readonly QUOTA_EXCEEDED_ERR: 22;
452
+ readonly TIMEOUT_ERR: 23;
453
+ readonly INVALID_NODE_TYPE_ERR: 24;
454
+ readonly DATA_CLONE_ERR: 25;
455
+ }
456
+
457
+ declare var DOMException: {
458
+ prototype: DOMException;
459
+ new(message?: string, name?: string): DOMException;
460
+ readonly INDEX_SIZE_ERR: 1;
461
+ readonly DOMSTRING_SIZE_ERR: 2;
462
+ readonly HIERARCHY_REQUEST_ERR: 3;
463
+ readonly WRONG_DOCUMENT_ERR: 4;
464
+ readonly INVALID_CHARACTER_ERR: 5;
465
+ readonly NO_DATA_ALLOWED_ERR: 6;
466
+ readonly NO_MODIFICATION_ALLOWED_ERR: 7;
467
+ readonly NOT_FOUND_ERR: 8;
468
+ readonly NOT_SUPPORTED_ERR: 9;
469
+ readonly INUSE_ATTRIBUTE_ERR: 10;
470
+ readonly INVALID_STATE_ERR: 11;
471
+ readonly SYNTAX_ERR: 12;
472
+ readonly INVALID_MODIFICATION_ERR: 13;
473
+ readonly NAMESPACE_ERR: 14;
474
+ readonly INVALID_ACCESS_ERR: 15;
475
+ readonly VALIDATION_ERR: 16;
476
+ readonly TYPE_MISMATCH_ERR: 17;
477
+ readonly SECURITY_ERR: 18;
478
+ readonly NETWORK_ERR: 19;
479
+ readonly ABORT_ERR: 20;
480
+ readonly URL_MISMATCH_ERR: 21;
481
+ readonly QUOTA_EXCEEDED_ERR: 22;
482
+ readonly TIMEOUT_ERR: 23;
483
+ readonly INVALID_NODE_TYPE_ERR: 24;
484
+ readonly DATA_CLONE_ERR: 25;
485
+ };
486
+
487
+ /**
488
+ * The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data.
489
+ *
490
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
491
+ */
492
+ interface DecompressionStream extends GenericTransformStream {
493
+ readonly readable: ReadableStream<Uint8Array<ArrayBuffer>>;
494
+ readonly writable: WritableStream<BufferSource>;
495
+ }
496
+
497
+ declare var DecompressionStream: {
498
+ prototype: DecompressionStream;
499
+ new(format: CompressionFormat): DecompressionStream;
500
+ };
501
+
502
+ /**
503
+ * The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files.
504
+ *
505
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
506
+ */
507
+ interface ErrorEvent extends Event {
508
+ /**
509
+ * The **`colno`** read-only property of the ErrorEvent interface returns an integer containing the column number of the script file on which the error occurred.
510
+ *
511
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno)
512
+ */
513
+ readonly colno: number;
514
+ /**
515
+ * The **`error`** read-only property of the ErrorEvent interface returns a JavaScript value, such as an Error or DOMException, representing the error associated with this event.
516
+ *
517
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error)
518
+ */
519
+ readonly error: any;
520
+ /**
521
+ * The **`filename`** read-only property of the ErrorEvent interface returns a string containing the name of the script file in which the error occurred.
522
+ *
523
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename)
524
+ */
525
+ readonly filename: string;
526
+ /**
527
+ * The **`lineno`** read-only property of the ErrorEvent interface returns an integer containing the line number of the script file on which the error occurred.
528
+ *
529
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno)
530
+ */
531
+ readonly lineno: number;
532
+ /**
533
+ * The **`message`** read-only property of the ErrorEvent interface returns a string containing a human-readable error message describing the problem.
534
+ *
535
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message)
536
+ */
537
+ readonly message: string;
538
+ }
539
+
540
+ declare var ErrorEvent: {
541
+ prototype: ErrorEvent;
542
+ new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
543
+ };
544
+
545
+ /**
546
+ * The **`Event`** interface represents an event which takes place on an `EventTarget`.
547
+ *
548
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
549
+ */
550
+ interface Event {
551
+ /**
552
+ * The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.
553
+ *
554
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)
555
+ */
556
+ readonly bubbles: boolean;
557
+ /**
558
+ * The **`cancelBubble`** property of the Event interface is deprecated.
559
+ * @deprecated
560
+ *
561
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
562
+ */
563
+ cancelBubble: boolean;
564
+ /**
565
+ * The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
566
+ *
567
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)
568
+ */
569
+ readonly cancelable: boolean;
570
+ /**
571
+ * The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM.
572
+ *
573
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
574
+ */
575
+ readonly composed: boolean;
576
+ /**
577
+ * The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.
578
+ *
579
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)
580
+ */
581
+ readonly currentTarget: EventTarget | null;
582
+ /**
583
+ * The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.
584
+ *
585
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)
586
+ */
587
+ readonly defaultPrevented: boolean;
588
+ /**
589
+ * The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated.
590
+ *
591
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
592
+ */
593
+ readonly eventPhase: number;
594
+ /**
595
+ * The **`isTrusted`** read-only property of the Event interface is a boolean value that is `true` when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via EventTarget.dispatchEvent().
596
+ *
597
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
598
+ */
599
+ readonly isTrusted: boolean;
600
+ /**
601
+ * The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.
602
+ * @deprecated
603
+ *
604
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)
605
+ */
606
+ returnValue: boolean;
607
+ /**
608
+ * The deprecated **`Event.srcElement`** is an alias for the Event.target property.
609
+ * @deprecated
610
+ *
611
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
612
+ */
613
+ readonly srcElement: EventTarget | null;
614
+ /**
615
+ * The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched.
616
+ *
617
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
618
+ */
619
+ readonly target: EventTarget | null;
620
+ /**
621
+ * The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.
622
+ *
623
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)
624
+ */
625
+ readonly timeStamp: DOMHighResTimeStamp;
626
+ /**
627
+ * The **`type`** read-only property of the Event interface returns a string containing the event's type.
628
+ *
629
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
630
+ */
631
+ readonly type: string;
632
+ /**
633
+ * The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.
634
+ *
635
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
636
+ */
637
+ composedPath(): EventTarget[];
638
+ /**
639
+ * The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().
640
+ * @deprecated
641
+ *
642
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)
643
+ */
644
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
645
+ /**
646
+ * The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken.
647
+ *
648
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
649
+ */
650
+ preventDefault(): void;
651
+ /**
652
+ * The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called.
653
+ *
654
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
655
+ */
656
+ stopImmediatePropagation(): void;
657
+ /**
658
+ * The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
659
+ *
660
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
661
+ */
662
+ stopPropagation(): void;
663
+ readonly NONE: 0;
664
+ readonly CAPTURING_PHASE: 1;
665
+ readonly AT_TARGET: 2;
666
+ readonly BUBBLING_PHASE: 3;
667
+ }
668
+
669
+ declare var Event: {
670
+ prototype: Event;
671
+ new(type: string, eventInitDict?: EventInit): Event;
672
+ readonly NONE: 0;
673
+ readonly CAPTURING_PHASE: 1;
674
+ readonly AT_TARGET: 2;
675
+ readonly BUBBLING_PHASE: 3;
676
+ };
677
+
678
+ interface EventListener {
679
+ (evt: Event): void;
680
+ }
681
+
682
+ interface EventListenerObject {
683
+ handleEvent(object: Event): void;
684
+ }
685
+
686
+ /**
687
+ * The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
688
+ *
689
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
690
+ */
691
+ interface EventTarget {
692
+ /**
693
+ * The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
694
+ *
695
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
696
+ */
697
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
698
+ /**
699
+ * The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
700
+ *
701
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
702
+ */
703
+ dispatchEvent(event: Event): boolean;
704
+ /**
705
+ * The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
706
+ *
707
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
708
+ */
709
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
710
+ }
711
+
712
+ declare var EventTarget: {
713
+ prototype: EventTarget;
714
+ new(): EventTarget;
715
+ };
716
+
717
+ interface GenericTransformStream {
718
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */
719
+ readonly readable: ReadableStream;
720
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/writable) */
721
+ readonly writable: WritableStream;
722
+ }
723
+
724
+ /**
725
+ * The **`MessageEvent`** interface represents a message received by a target object.
726
+ *
727
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
728
+ */
729
+ interface MessageEvent<T = any> extends Event {
730
+ /**
731
+ * The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
732
+ *
733
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
734
+ */
735
+ readonly data: T;
736
+ /**
737
+ * The **`lastEventId`** read-only property of the MessageEvent interface is a string representing a unique ID for the event.
738
+ *
739
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
740
+ */
741
+ readonly lastEventId: string;
742
+ /**
743
+ * The **`origin`** read-only property of the MessageEvent interface is a string representing the origin of the message emitter.
744
+ *
745
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
746
+ */
747
+ readonly origin: string;
748
+ /**
749
+ * The **`ports`** read-only property of the MessageEvent interface is an array of MessagePort objects containing all MessagePort objects sent with the message, in order.
750
+ *
751
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
752
+ */
753
+ readonly ports: ReadonlyArray<MessagePort>;
754
+ /**
755
+ * The **`source`** read-only property of the MessageEvent interface is a `MessageEventSource` (which can be a WindowProxy, MessagePort, or ServiceWorker object) representing the message emitter.
756
+ *
757
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
758
+ */
759
+ readonly source: MessageEventSource | null;
760
+ /** @deprecated */
761
+ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
762
+ }
763
+
764
+ declare var MessageEvent: {
765
+ prototype: MessageEvent;
766
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
767
+ };
768
+
769
+ interface MessageEventTargetEventMap {
770
+ "message": MessageEvent;
771
+ "messageerror": MessageEvent;
772
+ }
773
+
774
+ interface MessageEventTarget<T> {
775
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */
776
+ onmessage: ((this: T, ev: MessageEvent) => any) | null;
777
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */
778
+ onmessageerror: ((this: T, ev: MessageEvent) => any) | null;
779
+ addEventListener<K extends keyof MessageEventTargetEventMap>(type: K, listener: (this: T, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
780
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
781
+ removeEventListener<K extends keyof MessageEventTargetEventMap>(type: K, listener: (this: T, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
782
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
783
+ }
784
+
785
+ interface MessagePortEventMap extends MessageEventTargetEventMap {
786
+ "message": MessageEvent;
787
+ "messageerror": MessageEvent;
788
+ }
789
+
790
+ /**
791
+ * The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
792
+ *
793
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
794
+ */
795
+ interface MessagePort extends EventTarget, MessageEventTarget<MessagePort> {
796
+ /**
797
+ * The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
798
+ *
799
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
800
+ */
801
+ close(): void;
802
+ /**
803
+ * The **`postMessage()`** method of the MessagePort interface sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
804
+ *
805
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
806
+ */
807
+ postMessage(message: any, transfer: Transferable[]): void;
808
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
809
+ /**
810
+ * The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
811
+ *
812
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
813
+ */
814
+ start(): void;
815
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
816
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
817
+ removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
818
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
819
+ }
820
+
821
+ declare var MessagePort: {
822
+ prototype: MessagePort;
823
+ new(): MessagePort;
824
+ };
825
+
826
+ /**
827
+ * The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
828
+ *
829
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
830
+ */
831
+ interface PromiseRejectionEvent extends Event {
832
+ /**
833
+ * The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript Promise which was rejected.
834
+ *
835
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
836
+ */
837
+ readonly promise: Promise<any>;
838
+ /**
839
+ * The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
840
+ *
841
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
842
+ */
843
+ readonly reason: any;
844
+ }
845
+
846
+ declare var PromiseRejectionEvent: {
847
+ prototype: PromiseRejectionEvent;
848
+ new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
849
+ };
850
+
851
+ /**
852
+ * The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
853
+ *
854
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
855
+ */
856
+ interface ReadableByteStreamController {
857
+ /**
858
+ * The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
859
+ *
860
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
861
+ */
862
+ readonly byobRequest: ReadableStreamBYOBRequest | null;
863
+ /**
864
+ * The **`desiredSize`** read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its 'desired size'.
865
+ *
866
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
867
+ */
868
+ readonly desiredSize: number | null;
869
+ /**
870
+ * The **`close()`** method of the ReadableByteStreamController interface closes the associated stream.
871
+ *
872
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
873
+ */
874
+ close(): void;
875
+ /**
876
+ * The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
877
+ *
878
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
879
+ */
880
+ enqueue(chunk: ArrayBufferView<ArrayBuffer>): void;
881
+ /**
882
+ * The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
883
+ *
884
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
885
+ */
886
+ error(e?: any): void;
887
+ }
888
+
889
+ declare var ReadableByteStreamController: {
890
+ prototype: ReadableByteStreamController;
891
+ new(): ReadableByteStreamController;
892
+ };
893
+
894
+ /**
895
+ * The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
896
+ *
897
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
898
+ */
899
+ interface ReadableStream<R = any> {
900
+ /**
901
+ * The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
902
+ *
903
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
904
+ */
905
+ readonly locked: boolean;
906
+ /**
907
+ * The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
908
+ *
909
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
910
+ */
911
+ cancel(reason?: any): Promise<void>;
912
+ /**
913
+ * The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
914
+ *
915
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
916
+ */
917
+ getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
918
+ getReader(): ReadableStreamDefaultReader<R>;
919
+ getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
920
+ /**
921
+ * The **`pipeThrough()`** method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
922
+ *
923
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
924
+ */
925
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
926
+ /**
927
+ * The **`pipeTo()`** method of the ReadableStream interface pipes the current `ReadableStream` to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
928
+ *
929
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
930
+ */
931
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
932
+ /**
933
+ * The **`tee()`** method of the ReadableStream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new ReadableStream instances.
934
+ *
935
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
936
+ */
937
+ tee(): [ReadableStream<R>, ReadableStream<R>];
938
+ }
939
+
940
+ declare var ReadableStream: {
941
+ prototype: ReadableStream;
942
+ new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream<Uint8Array<ArrayBuffer>>;
943
+ new<R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
944
+ new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
945
+ };
946
+
947
+ /**
948
+ * The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.
949
+ *
950
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
951
+ */
952
+ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
953
+ /**
954
+ * The **`read()`** method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.
955
+ *
956
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
957
+ */
958
+ read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
959
+ /**
960
+ * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
961
+ *
962
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
963
+ */
964
+ releaseLock(): void;
965
+ }
966
+
967
+ declare var ReadableStreamBYOBReader: {
968
+ prototype: ReadableStreamBYOBReader;
969
+ new(stream: ReadableStream<Uint8Array<ArrayBuffer>>): ReadableStreamBYOBReader;
970
+ };
971
+
972
+ /**
973
+ * The **`ReadableStreamBYOBRequest`** interface of the Streams API represents a 'pull request' for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream's internal queues).
974
+ *
975
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
976
+ */
977
+ interface ReadableStreamBYOBRequest {
978
+ /**
979
+ * The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
980
+ *
981
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
982
+ */
983
+ readonly view: ArrayBufferView<ArrayBuffer> | null;
984
+ /**
985
+ * The **`respond()`** method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.
986
+ *
987
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
988
+ */
989
+ respond(bytesWritten: number): void;
990
+ /**
991
+ * The **`respondWithNewView()`** method of the ReadableStreamBYOBRequest interface specifies a new view that the consumer of the associated readable byte stream should write to instead of ReadableStreamBYOBRequest.view.
992
+ *
993
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
994
+ */
995
+ respondWithNewView(view: ArrayBufferView<ArrayBuffer>): void;
996
+ }
997
+
998
+ declare var ReadableStreamBYOBRequest: {
999
+ prototype: ReadableStreamBYOBRequest;
1000
+ new(): ReadableStreamBYOBRequest;
1001
+ };
1002
+
1003
+ /**
1004
+ * The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
1005
+ *
1006
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
1007
+ */
1008
+ interface ReadableStreamDefaultController<R = any> {
1009
+ /**
1010
+ * The **`desiredSize`** read-only property of the ReadableStreamDefaultController interface returns the desired size required to fill the stream's internal queue.
1011
+ *
1012
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
1013
+ */
1014
+ readonly desiredSize: number | null;
1015
+ /**
1016
+ * The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream.
1017
+ *
1018
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
1019
+ */
1020
+ close(): void;
1021
+ /**
1022
+ * The **`enqueue()`** method of the ReadableStreamDefaultController interface enqueues a given chunk in the associated stream.
1023
+ *
1024
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
1025
+ */
1026
+ enqueue(chunk?: R): void;
1027
+ /**
1028
+ * The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
1029
+ *
1030
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
1031
+ */
1032
+ error(e?: any): void;
1033
+ }
1034
+
1035
+ declare var ReadableStreamDefaultController: {
1036
+ prototype: ReadableStreamDefaultController;
1037
+ new(): ReadableStreamDefaultController;
1038
+ };
1039
+
1040
+ /**
1041
+ * The **`ReadableStreamDefaultReader`** interface of the Streams API represents a default reader that can be used to read stream data supplied from a network (such as a fetch request).
1042
+ *
1043
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader)
1044
+ */
1045
+ interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
1046
+ /**
1047
+ * The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
1048
+ *
1049
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)
1050
+ */
1051
+ read(): Promise<ReadableStreamReadResult<R>>;
1052
+ /**
1053
+ * The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.
1054
+ *
1055
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)
1056
+ */
1057
+ releaseLock(): void;
1058
+ }
1059
+
1060
+ declare var ReadableStreamDefaultReader: {
1061
+ prototype: ReadableStreamDefaultReader;
1062
+ new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
1063
+ };
1064
+
1065
+ interface ReadableStreamGenericReader {
1066
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed) */
1067
+ readonly closed: Promise<void>;
1068
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) */
1069
+ cancel(reason?: any): Promise<void>;
1070
+ }
1071
+
1072
+ /**
1073
+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
1074
+ *
1075
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1076
+ */
1077
+ interface TextDecoder extends TextDecoderCommon {
1078
+ /**
1079
+ * The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.
1080
+ *
1081
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
1082
+ */
1083
+ decode(input?: AllowSharedBufferSource, options?: TextDecodeOptions): string;
1084
+ }
1085
+
1086
+ declare var TextDecoder: {
1087
+ prototype: TextDecoder;
1088
+ new(label?: string, options?: TextDecoderOptions): TextDecoder;
1089
+ };
1090
+
1091
+ interface TextDecoderCommon {
1092
+ /**
1093
+ * Returns encoding's name, lowercased.
1094
+ *
1095
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/encoding)
1096
+ */
1097
+ readonly encoding: string;
1098
+ /**
1099
+ * Returns true if error mode is "fatal", otherwise false.
1100
+ *
1101
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/fatal)
1102
+ */
1103
+ readonly fatal: boolean;
1104
+ /**
1105
+ * Returns the value of ignore BOM.
1106
+ *
1107
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/ignoreBOM)
1108
+ */
1109
+ readonly ignoreBOM: boolean;
1110
+ }
1111
+
1112
+ /**
1113
+ * The **`TextDecoderStream`** interface of the Encoding API converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings.
1114
+ *
1115
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
1116
+ */
1117
+ interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
1118
+ readonly readable: ReadableStream<string>;
1119
+ readonly writable: WritableStream<BufferSource>;
1120
+ }
1121
+
1122
+ declare var TextDecoderStream: {
1123
+ prototype: TextDecoderStream;
1124
+ new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
1125
+ };
1126
+
1127
+ /**
1128
+ * The **`TextEncoder`** interface enables you to character encoding a JavaScript string using UTF-8.
1129
+ *
1130
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
1131
+ */
1132
+ interface TextEncoder extends TextEncoderCommon {
1133
+ /**
1134
+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the string character encoding using UTF-8.
1135
+ *
1136
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
1137
+ */
1138
+ encode(input?: string): Uint8Array<ArrayBuffer>;
1139
+ /**
1140
+ * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns an object indicating the progress of the encoding.
1141
+ *
1142
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
1143
+ */
1144
+ encodeInto(source: string, destination: Uint8Array<ArrayBufferLike>): TextEncoderEncodeIntoResult;
1145
+ }
1146
+
1147
+ declare var TextEncoder: {
1148
+ prototype: TextEncoder;
1149
+ new(): TextEncoder;
1150
+ };
1151
+
1152
+ interface TextEncoderCommon {
1153
+ /**
1154
+ * Returns "utf-8".
1155
+ *
1156
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encoding)
1157
+ */
1158
+ readonly encoding: string;
1159
+ }
1160
+
1161
+ /**
1162
+ * The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
1163
+ *
1164
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
1165
+ */
1166
+ interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
1167
+ readonly readable: ReadableStream<Uint8Array<ArrayBuffer>>;
1168
+ readonly writable: WritableStream<string>;
1169
+ }
1170
+
1171
+ declare var TextEncoderStream: {
1172
+ prototype: TextEncoderStream;
1173
+ new(): TextEncoderStream;
1174
+ };
1175
+
1176
+ /**
1177
+ * The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept.
1178
+ *
1179
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
1180
+ */
1181
+ interface TransformStream<I = any, O = any> {
1182
+ /**
1183
+ * The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`.
1184
+ *
1185
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
1186
+ */
1187
+ readonly readable: ReadableStream<O>;
1188
+ /**
1189
+ * The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
1190
+ *
1191
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
1192
+ */
1193
+ readonly writable: WritableStream<I>;
1194
+ }
1195
+
1196
+ declare var TransformStream: {
1197
+ prototype: TransformStream;
1198
+ new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
1199
+ };
1200
+
1201
+ /**
1202
+ * The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
1203
+ *
1204
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
1205
+ */
1206
+ interface TransformStreamDefaultController<O = any> {
1207
+ /**
1208
+ * The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
1209
+ *
1210
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)
1211
+ */
1212
+ readonly desiredSize: number | null;
1213
+ /**
1214
+ * The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
1215
+ *
1216
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)
1217
+ */
1218
+ enqueue(chunk?: O): void;
1219
+ /**
1220
+ * The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
1221
+ *
1222
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
1223
+ */
1224
+ error(reason?: any): void;
1225
+ /**
1226
+ * The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
1227
+ *
1228
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)
1229
+ */
1230
+ terminate(): void;
1231
+ }
1232
+
1233
+ declare var TransformStreamDefaultController: {
1234
+ prototype: TransformStreamDefaultController;
1235
+ new(): TransformStreamDefaultController;
1236
+ };
1237
+
1238
+ /**
1239
+ * The **`URL`** interface is used to parse, construct, normalize, and encode URL.
1240
+ *
1241
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
1242
+ */
1243
+ interface URL {
1244
+ /**
1245
+ * The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
1246
+ *
1247
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
1248
+ */
1249
+ hash: string;
1250
+ /**
1251
+ * The **`host`** property of the URL interface is a string containing the host, which is the URL.hostname, and then, if the port of the URL is nonempty, a `':'`, followed by the URL.port of the URL.
1252
+ *
1253
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
1254
+ */
1255
+ host: string;
1256
+ /**
1257
+ * The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
1258
+ *
1259
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
1260
+ */
1261
+ hostname: string;
1262
+ /**
1263
+ * The **`href`** property of the URL interface is a string containing the whole URL.
1264
+ *
1265
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
1266
+ */
1267
+ href: string;
1268
+ toString(): string;
1269
+ /**
1270
+ * The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
1271
+ *
1272
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
1273
+ */
1274
+ readonly origin: string;
1275
+ /**
1276
+ * The **`password`** property of the URL interface is a string containing the password component of the URL.
1277
+ *
1278
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
1279
+ */
1280
+ password: string;
1281
+ /**
1282
+ * The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
1283
+ *
1284
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
1285
+ */
1286
+ pathname: string;
1287
+ /**
1288
+ * The **`port`** property of the URL interface is a string containing the port number of the URL.
1289
+ *
1290
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
1291
+ */
1292
+ port: string;
1293
+ /**
1294
+ * The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
1295
+ *
1296
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
1297
+ */
1298
+ protocol: string;
1299
+ /**
1300
+ * The **`search`** property of the URL interface is a search string, also called a _query string_, that is a string containing a `'?'` followed by the parameters of the URL.
1301
+ *
1302
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
1303
+ */
1304
+ search: string;
1305
+ /**
1306
+ * The **`searchParams`** read-only property of the URL interface returns a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL.
1307
+ *
1308
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
1309
+ */
1310
+ readonly searchParams: URLSearchParams;
1311
+ /**
1312
+ * The **`username`** property of the URL interface is a string containing the username component of the URL.
1313
+ *
1314
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
1315
+ */
1316
+ username: string;
1317
+ /**
1318
+ * The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as URL.toString().
1319
+ *
1320
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
1321
+ */
1322
+ toJSON(): string;
1323
+ }
1324
+
1325
+ declare var URL: {
1326
+ prototype: URL;
1327
+ new(url: string | URL, base?: string | URL): URL;
1328
+ /**
1329
+ * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
1330
+ *
1331
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static)
1332
+ */
1333
+ canParse(url: string | URL, base?: string | URL): boolean;
1334
+ /**
1335
+ * The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
1336
+ *
1337
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static)
1338
+ */
1339
+ parse(url: string | URL, base?: string | URL): URL | null;
1340
+ };
1341
+
1342
+ /**
1343
+ * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
1344
+ *
1345
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
1346
+ */
1347
+ interface URLSearchParams {
1348
+ /**
1349
+ * The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
1350
+ *
1351
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
1352
+ */
1353
+ readonly size: number;
1354
+ /**
1355
+ * The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
1356
+ *
1357
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
1358
+ */
1359
+ append(name: string, value: string): void;
1360
+ /**
1361
+ * The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
1362
+ *
1363
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
1364
+ */
1365
+ delete(name: string, value?: string): void;
1366
+ /**
1367
+ * The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
1368
+ *
1369
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
1370
+ */
1371
+ get(name: string): string | null;
1372
+ /**
1373
+ * The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
1374
+ *
1375
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
1376
+ */
1377
+ getAll(name: string): string[];
1378
+ /**
1379
+ * The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
1380
+ *
1381
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
1382
+ */
1383
+ has(name: string, value?: string): boolean;
1384
+ /**
1385
+ * The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
1386
+ *
1387
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
1388
+ */
1389
+ set(name: string, value: string): void;
1390
+ /**
1391
+ * The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`.
1392
+ *
1393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
1394
+ */
1395
+ sort(): void;
1396
+ toString(): string;
1397
+ forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
1398
+ }
1399
+
1400
+ declare var URLSearchParams: {
1401
+ prototype: URLSearchParams;
1402
+ new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
1403
+ };
1404
+
1405
+ /**
1406
+ * The **`WorkletGlobalScope`** interface is an abstract class that specific worklet scope classes inherit from.
1407
+ * Available only in secure contexts.
1408
+ *
1409
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkletGlobalScope)
1410
+ */
1411
+ interface WorkletGlobalScope {
1412
+ }
1413
+
1414
+ declare var WorkletGlobalScope: {
1415
+ prototype: WorkletGlobalScope;
1416
+ new(): WorkletGlobalScope;
1417
+ };
1418
+
1419
+ /**
1420
+ * The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
1421
+ *
1422
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
1423
+ */
1424
+ interface WritableStream<W = any> {
1425
+ /**
1426
+ * The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer.
1427
+ *
1428
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
1429
+ */
1430
+ readonly locked: boolean;
1431
+ /**
1432
+ * The **`abort()`** method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
1433
+ *
1434
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
1435
+ */
1436
+ abort(reason?: any): Promise<void>;
1437
+ /**
1438
+ * The **`close()`** method of the WritableStream interface closes the associated stream.
1439
+ *
1440
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
1441
+ */
1442
+ close(): Promise<void>;
1443
+ /**
1444
+ * The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
1445
+ *
1446
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
1447
+ */
1448
+ getWriter(): WritableStreamDefaultWriter<W>;
1449
+ }
1450
+
1451
+ declare var WritableStream: {
1452
+ prototype: WritableStream;
1453
+ new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
1454
+ };
1455
+
1456
+ /**
1457
+ * The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
1458
+ *
1459
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
1460
+ */
1461
+ interface WritableStreamDefaultController {
1462
+ /**
1463
+ * The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
1464
+ *
1465
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
1466
+ */
1467
+ readonly signal: AbortSignal;
1468
+ /**
1469
+ * The **`error()`** method of the WritableStreamDefaultController interface causes any future interactions with the associated stream to error.
1470
+ *
1471
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
1472
+ */
1473
+ error(e?: any): void;
1474
+ }
1475
+
1476
+ declare var WritableStreamDefaultController: {
1477
+ prototype: WritableStreamDefaultController;
1478
+ new(): WritableStreamDefaultController;
1479
+ };
1480
+
1481
+ /**
1482
+ * The **`WritableStreamDefaultWriter`** interface of the Streams API is the object returned by WritableStream.getWriter() and once created locks the writer to the `WritableStream` ensuring that no other streams can write to the underlying sink.
1483
+ *
1484
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
1485
+ */
1486
+ interface WritableStreamDefaultWriter<W = any> {
1487
+ /**
1488
+ * The **`closed`** read-only property of the WritableStreamDefaultWriter interface returns a Promise that fulfills if the stream becomes closed, or rejects if the stream errors or the writer's lock is released.
1489
+ *
1490
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
1491
+ */
1492
+ readonly closed: Promise<void>;
1493
+ /**
1494
+ * The **`desiredSize`** read-only property of the WritableStreamDefaultWriter interface returns the desired size required to fill the stream's internal queue.
1495
+ *
1496
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
1497
+ */
1498
+ readonly desiredSize: number | null;
1499
+ /**
1500
+ * The **`ready`** read-only property of the WritableStreamDefaultWriter interface returns a Promise that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
1501
+ *
1502
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
1503
+ */
1504
+ readonly ready: Promise<void>;
1505
+ /**
1506
+ * The **`abort()`** method of the WritableStreamDefaultWriter interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
1507
+ *
1508
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
1509
+ */
1510
+ abort(reason?: any): Promise<void>;
1511
+ /**
1512
+ * The **`close()`** method of the WritableStreamDefaultWriter interface closes the associated writable stream.
1513
+ *
1514
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
1515
+ */
1516
+ close(): Promise<void>;
1517
+ /**
1518
+ * The **`releaseLock()`** method of the WritableStreamDefaultWriter interface releases the writer's lock on the corresponding stream.
1519
+ *
1520
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
1521
+ */
1522
+ releaseLock(): void;
1523
+ /**
1524
+ * The **`write()`** method of the WritableStreamDefaultWriter interface writes a passed chunk of data to a WritableStream and its underlying sink, then returns a Promise that resolves to indicate the success or failure of the write operation.
1525
+ *
1526
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
1527
+ */
1528
+ write(chunk?: W): Promise<void>;
1529
+ }
1530
+
1531
+ declare var WritableStreamDefaultWriter: {
1532
+ prototype: WritableStreamDefaultWriter;
1533
+ new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
1534
+ };
1535
+
1536
+ declare namespace WebAssembly {
1537
+ interface CompileError extends Error {
1538
+ }
1539
+
1540
+ var CompileError: {
1541
+ prototype: CompileError;
1542
+ new(message?: string): CompileError;
1543
+ (message?: string): CompileError;
1544
+ };
1545
+
1546
+ /**
1547
+ * A **`WebAssembly.Global`** object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances.
1548
+ *
1549
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Global)
1550
+ */
1551
+ interface Global<T extends ValueType = ValueType> {
1552
+ value: ValueTypeMap[T];
1553
+ valueOf(): ValueTypeMap[T];
1554
+ }
1555
+
1556
+ var Global: {
1557
+ prototype: Global;
1558
+ new<T extends ValueType = ValueType>(descriptor: GlobalDescriptor<T>, v?: ValueTypeMap[T]): Global<T>;
1559
+ };
1560
+
1561
+ /**
1562
+ * A **`WebAssembly.Instance`** object is a stateful, executable instance of a `WebAssembly.Module`.
1563
+ *
1564
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Instance)
1565
+ */
1566
+ interface Instance {
1567
+ /**
1568
+ * The **`exports`** read-only property of the `WebAssembly.Instance` object prototype returns an object containing as its members all the functions exported from the WebAssembly module instance, to allow them to be accessed and used by JavaScript.
1569
+ *
1570
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Instance/exports)
1571
+ */
1572
+ readonly exports: Exports;
1573
+ }
1574
+
1575
+ var Instance: {
1576
+ prototype: Instance;
1577
+ new(module: Module, importObject?: Imports): Instance;
1578
+ };
1579
+
1580
+ interface LinkError extends Error {
1581
+ }
1582
+
1583
+ var LinkError: {
1584
+ prototype: LinkError;
1585
+ new(message?: string): LinkError;
1586
+ (message?: string): LinkError;
1587
+ };
1588
+
1589
+ /**
1590
+ * The **`WebAssembly.Memory`** object is a resizable ArrayBuffer or SharedArrayBuffer that holds raw bytes of memory accessed by a `WebAssembly.Instance`.
1591
+ *
1592
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory)
1593
+ */
1594
+ interface Memory {
1595
+ /**
1596
+ * The read-only **`buffer`** prototype property of the `WebAssembly.Memory` object returns the buffer contained in the memory.
1597
+ *
1598
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/buffer)
1599
+ */
1600
+ readonly buffer: ArrayBuffer;
1601
+ /**
1602
+ * The **`grow()`** prototype method of the `WebAssembly.Memory` object increases the size of the memory instance by a specified number of WebAssembly pages.
1603
+ *
1604
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow)
1605
+ */
1606
+ grow(delta: number): number;
1607
+ }
1608
+
1609
+ var Memory: {
1610
+ prototype: Memory;
1611
+ new(descriptor: MemoryDescriptor): Memory;
1612
+ };
1613
+
1614
+ /**
1615
+ * A **`WebAssembly.Module`** object contains stateless WebAssembly code that has already been compiled by the browser — this can be efficiently shared with Workers, and instantiated multiple times.
1616
+ *
1617
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Module)
1618
+ */
1619
+ interface Module {
1620
+ }
1621
+
1622
+ var Module: {
1623
+ prototype: Module;
1624
+ new(bytes: BufferSource): Module;
1625
+ /**
1626
+ * The **`WebAssembly.Module.customSections()`** static method returns a copy of the contents of all custom sections in the given module with the given string name.
1627
+ *
1628
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Module/customSections_static)
1629
+ */
1630
+ customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
1631
+ /**
1632
+ * The **`WebAssembly.Module.exports()`** static method returns an array containing descriptions of all the declared exports of the given `Module`.
1633
+ *
1634
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Module/exports_static)
1635
+ */
1636
+ exports(moduleObject: Module): ModuleExportDescriptor[];
1637
+ /**
1638
+ * The **`WebAssembly.Module.imports()`** static method returns an array containing descriptions of all the declared imports of the given `Module`.
1639
+ *
1640
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Module/imports_static)
1641
+ */
1642
+ imports(moduleObject: Module): ModuleImportDescriptor[];
1643
+ };
1644
+
1645
+ interface RuntimeError extends Error {
1646
+ }
1647
+
1648
+ var RuntimeError: {
1649
+ prototype: RuntimeError;
1650
+ new(message?: string): RuntimeError;
1651
+ (message?: string): RuntimeError;
1652
+ };
1653
+
1654
+ /**
1655
+ * The **`WebAssembly.Table`** object is a JavaScript wrapper object — an array-like structure representing a WebAssembly table, which stores homogeneous references.
1656
+ *
1657
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table)
1658
+ */
1659
+ interface Table {
1660
+ /**
1661
+ * The read-only **`length`** prototype property of the `WebAssembly.Table` object returns the length of the table, i.e., the number of elements in the table.
1662
+ *
1663
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/length)
1664
+ */
1665
+ readonly length: number;
1666
+ /**
1667
+ * The **`get()`** prototype method of the `WebAssembly.Table()` object retrieves the element stored at a given index.
1668
+ *
1669
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/get)
1670
+ */
1671
+ get(index: number): any;
1672
+ /**
1673
+ * The **`grow()`** prototype method of the `WebAssembly.Table` object increases the size of the `Table` instance by a specified number of elements, filled with the provided value.
1674
+ *
1675
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/grow)
1676
+ */
1677
+ grow(delta: number, value?: any): number;
1678
+ /**
1679
+ * The **`set()`** prototype method of the `WebAssembly.Table` object mutates a reference stored at a given index to a different value.
1680
+ *
1681
+ * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Table/set)
1682
+ */
1683
+ set(index: number, value?: any): void;
1684
+ }
1685
+
1686
+ var Table: {
1687
+ prototype: Table;
1688
+ new(descriptor: TableDescriptor, value?: any): Table;
1689
+ };
1690
+
1691
+ interface GlobalDescriptor<T extends ValueType = ValueType> {
1692
+ mutable?: boolean;
1693
+ value: T;
1694
+ }
1695
+
1696
+ interface MemoryDescriptor {
1697
+ initial: number;
1698
+ maximum?: number;
1699
+ shared?: boolean;
1700
+ }
1701
+
1702
+ interface ModuleExportDescriptor {
1703
+ kind: ImportExportKind;
1704
+ name: string;
1705
+ }
1706
+
1707
+ interface ModuleImportDescriptor {
1708
+ kind: ImportExportKind;
1709
+ module: string;
1710
+ name: string;
1711
+ }
1712
+
1713
+ interface TableDescriptor {
1714
+ element: TableKind;
1715
+ initial: number;
1716
+ maximum?: number;
1717
+ }
1718
+
1719
+ interface ValueTypeMap {
1720
+ anyfunc: Function;
1721
+ externref: any;
1722
+ f32: number;
1723
+ f64: number;
1724
+ i32: number;
1725
+ i64: bigint;
1726
+ v128: never;
1727
+ }
1728
+
1729
+ interface WebAssemblyInstantiatedSource {
1730
+ instance: Instance;
1731
+ module: Module;
1732
+ }
1733
+
1734
+ type ImportExportKind = "function" | "global" | "memory" | "table";
1735
+ type TableKind = "anyfunc" | "externref";
1736
+ type ExportValue = Function | Global | Memory | Table;
1737
+ type Exports = Record<string, ExportValue>;
1738
+ type ImportValue = ExportValue | number;
1739
+ type Imports = Record<string, ModuleImports>;
1740
+ type ModuleImports = Record<string, ImportValue>;
1741
+ type ValueType = keyof ValueTypeMap;
1742
+ /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/compile_static) */
1743
+ function compile(bytes: BufferSource): Promise<Module>;
1744
+ /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/instantiate_static) */
1745
+ function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
1746
+ function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
1747
+ /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/validate_static) */
1748
+ function validate(bytes: BufferSource): boolean;
1749
+ }
1750
+
1751
+ /** The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). */
1752
+ /**
1753
+ * The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox).
1754
+ *
1755
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console)
1756
+ */
1757
+ interface Console {
1758
+ /**
1759
+ * The **`console.assert()`** static method writes an error message to the console if the assertion is false.
1760
+ *
1761
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert_static)
1762
+ */
1763
+ assert(condition?: boolean, ...data: any[]): void;
1764
+ /**
1765
+ * The **`console.clear()`** static method clears the console if possible.
1766
+ *
1767
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static)
1768
+ */
1769
+ clear(): void;
1770
+ /**
1771
+ * The **`console.count()`** static method logs the number of times that this particular call to `count()` has been called.
1772
+ *
1773
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
1774
+ */
1775
+ count(label?: string): void;
1776
+ /**
1777
+ * The **`console.countReset()`** static method resets counter used with console/count_static.
1778
+ *
1779
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
1780
+ */
1781
+ countReset(label?: string): void;
1782
+ /**
1783
+ * The **`console.debug()`** static method outputs a message to the console at the 'debug' log level.
1784
+ *
1785
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
1786
+ */
1787
+ debug(...data: any[]): void;
1788
+ /**
1789
+ * The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object.
1790
+ *
1791
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
1792
+ */
1793
+ dir(item?: any, options?: any): void;
1794
+ /**
1795
+ * The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element.
1796
+ *
1797
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
1798
+ */
1799
+ dirxml(...data: any[]): void;
1800
+ /**
1801
+ * The **`console.error()`** static method outputs a message to the console at the 'error' log level.
1802
+ *
1803
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
1804
+ */
1805
+ error(...data: any[]): void;
1806
+ /**
1807
+ * The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console/groupEnd_static is called.
1808
+ *
1809
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
1810
+ */
1811
+ group(...data: any[]): void;
1812
+ /**
1813
+ * The **`console.groupCollapsed()`** static method creates a new inline group in the console.
1814
+ *
1815
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
1816
+ */
1817
+ groupCollapsed(...data: any[]): void;
1818
+ /**
1819
+ * The **`console.groupEnd()`** static method exits the current inline group in the console.
1820
+ *
1821
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
1822
+ */
1823
+ groupEnd(): void;
1824
+ /**
1825
+ * The **`console.info()`** static method outputs a message to the console at the 'info' log level.
1826
+ *
1827
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
1828
+ */
1829
+ info(...data: any[]): void;
1830
+ /**
1831
+ * The **`console.log()`** static method outputs a message to the console.
1832
+ *
1833
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
1834
+ */
1835
+ log(...data: any[]): void;
1836
+ /**
1837
+ * The **`console.table()`** static method displays tabular data as a table.
1838
+ *
1839
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static)
1840
+ */
1841
+ table(tabularData?: any, properties?: string[]): void;
1842
+ /**
1843
+ * The **`console.time()`** static method starts a timer you can use to track how long an operation takes.
1844
+ *
1845
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
1846
+ */
1847
+ time(label?: string): void;
1848
+ /**
1849
+ * The **`console.timeEnd()`** static method stops a timer that was previously started by calling console/time_static.
1850
+ *
1851
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
1852
+ */
1853
+ timeEnd(label?: string): void;
1854
+ /**
1855
+ * The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console/time_static.
1856
+ *
1857
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
1858
+ */
1859
+ timeLog(label?: string, ...data: any[]): void;
1860
+ timeStamp(label?: string): void;
1861
+ /**
1862
+ * The **`console.trace()`** static method outputs a stack trace to the console.
1863
+ *
1864
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static)
1865
+ */
1866
+ trace(...data: any[]): void;
1867
+ /**
1868
+ * The **`console.warn()`** static method outputs a warning message to the console at the 'warning' log level.
1869
+ *
1870
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
1871
+ */
1872
+ warn(...data: any[]): void;
1873
+ }
1874
+
1875
+ declare var console: Console;
1876
+
1877
+ interface AudioWorkletProcessorConstructor {
1878
+ new (options: any): AudioWorkletProcessorImpl;
1879
+ }
1880
+
1881
+ interface QueuingStrategySize<T = any> {
1882
+ (chunk: T): number;
1883
+ }
1884
+
1885
+ interface TransformerFlushCallback<O> {
1886
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
1887
+ }
1888
+
1889
+ interface TransformerStartCallback<O> {
1890
+ (controller: TransformStreamDefaultController<O>): any;
1891
+ }
1892
+
1893
+ interface TransformerTransformCallback<I, O> {
1894
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
1895
+ }
1896
+
1897
+ interface UnderlyingSinkAbortCallback {
1898
+ (reason?: any): void | PromiseLike<void>;
1899
+ }
1900
+
1901
+ interface UnderlyingSinkCloseCallback {
1902
+ (): void | PromiseLike<void>;
1903
+ }
1904
+
1905
+ interface UnderlyingSinkStartCallback {
1906
+ (controller: WritableStreamDefaultController): any;
1907
+ }
1908
+
1909
+ interface UnderlyingSinkWriteCallback<W> {
1910
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
1911
+ }
1912
+
1913
+ interface UnderlyingSourceCancelCallback {
1914
+ (reason?: any): void | PromiseLike<void>;
1915
+ }
1916
+
1917
+ interface UnderlyingSourcePullCallback<R> {
1918
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
1919
+ }
1920
+
1921
+ interface UnderlyingSourceStartCallback<R> {
1922
+ (controller: ReadableStreamController<R>): any;
1923
+ }
1924
+
1925
+ /**
1926
+ * The read-only **`currentFrame`** property of the AudioWorkletGlobalScope interface returns an integer that represents the ever-increasing current sample-frame of the audio block being processed.
1927
+ *
1928
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/currentFrame)
1929
+ */
1930
+ declare var currentFrame: number;
1931
+ /**
1932
+ * The read-only **`currentTime`** property of the AudioWorkletGlobalScope interface returns a double that represents the ever-increasing context time of the audio block being processed.
1933
+ *
1934
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/currentTime)
1935
+ */
1936
+ declare var currentTime: number;
1937
+ /**
1938
+ * The read-only **`sampleRate`** property of the AudioWorkletGlobalScope interface returns a float that represents the sample rate of the associated BaseAudioContext the worklet belongs to.
1939
+ *
1940
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/sampleRate)
1941
+ */
1942
+ declare var sampleRate: number;
1943
+ /**
1944
+ * The **`registerProcessor`** method of the AudioWorkletGlobalScope interface registers a class constructor derived from AudioWorkletProcessor interface under a specified _name_.
1945
+ *
1946
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletGlobalScope/registerProcessor)
1947
+ */
1948
+ declare function registerProcessor(name: string, processorCtor: AudioWorkletProcessorConstructor): void;
1949
+ type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView<ArrayBufferLike>;
1950
+ type BufferSource = ArrayBufferView<ArrayBuffer> | ArrayBuffer;
1951
+ type DOMHighResTimeStamp = number;
1952
+ type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
1953
+ type MessageEventSource = MessagePort;
1954
+ type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
1955
+ type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
1956
+ type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
1957
+ type Transferable = MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer;
1958
+ type CompressionFormat = "deflate" | "deflate-raw" | "gzip";
1959
+ type ReadableStreamReaderMode = "byob";
1960
+ type ReadableStreamType = "bytes";