web-streams-polyfill 3.3.1 → 3.3.2
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/dist/polyfill.es2018.js +1 -1
- package/dist/polyfill.es2018.min.js +1 -1
- package/dist/polyfill.es2018.mjs +1 -1
- package/dist/polyfill.es6.js +1 -1
- package/dist/polyfill.es6.min.js +1 -1
- package/dist/polyfill.es6.mjs +1 -1
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.min.js +1 -1
- package/dist/polyfill.mjs +1 -1
- package/dist/ponyfill.es2018.js +1 -1
- package/dist/ponyfill.es2018.mjs +1 -1
- package/dist/ponyfill.es6.js +1 -1
- package/dist/ponyfill.es6.mjs +1 -1
- package/dist/ponyfill.js +1 -1
- package/dist/ponyfill.mjs +1 -1
- package/dist/types/polyfill.d.ts +24 -0
- package/dist/types/ts3.6/polyfill.d.ts +29 -0
- package/package.json +1 -1
package/dist/polyfill.es2018.js
CHANGED
package/dist/polyfill.es2018.mjs
CHANGED
package/dist/polyfill.es6.js
CHANGED
package/dist/polyfill.es6.min.js
CHANGED
package/dist/polyfill.es6.mjs
CHANGED
package/dist/polyfill.js
CHANGED
package/dist/polyfill.min.js
CHANGED
package/dist/polyfill.mjs
CHANGED
package/dist/ponyfill.es2018.js
CHANGED
package/dist/ponyfill.es2018.mjs
CHANGED
package/dist/ponyfill.es6.js
CHANGED
package/dist/ponyfill.es6.mjs
CHANGED
package/dist/ponyfill.js
CHANGED
package/dist/ponyfill.mjs
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference lib="dom" />
|
|
2
|
+
/// <reference lib="esnext.asynciterable" />
|
|
3
|
+
import { ReadableStreamAsyncIterator, ReadableStreamIteratorOptions } from './ponyfill';
|
|
4
|
+
export * from './ponyfill';
|
|
5
|
+
declare global {
|
|
6
|
+
interface ReadableStream<R = any> {
|
|
7
|
+
/**
|
|
8
|
+
* Asynchronously iterates over the chunks in the stream's internal queue.
|
|
9
|
+
*
|
|
10
|
+
* Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader.
|
|
11
|
+
* The lock will be released if the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method
|
|
12
|
+
* is called, e.g. by breaking out of the loop.
|
|
13
|
+
*
|
|
14
|
+
* By default, calling the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method will also
|
|
15
|
+
* cancel the stream. To prevent this, use the stream's {@link ReadableStream.values | values()} method, passing
|
|
16
|
+
* `true` for the `preventCancel` option.
|
|
17
|
+
*/
|
|
18
|
+
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
|
19
|
+
/**
|
|
20
|
+
* {@inheritDoc ReadableStream.values}
|
|
21
|
+
*/
|
|
22
|
+
[Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<R>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference lib="dom" />
|
|
2
|
+
/// <reference lib="es2018.asynciterable" />
|
|
3
|
+
|
|
4
|
+
import type { ReadableStreamAsyncIterator, ReadableStreamIteratorOptions } from './ponyfill';
|
|
5
|
+
|
|
6
|
+
export * from './ponyfill';
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
interface ReadableStream<R = any> {
|
|
10
|
+
/**
|
|
11
|
+
* Asynchronously iterates over the chunks in the stream's internal queue.
|
|
12
|
+
*
|
|
13
|
+
* Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader.
|
|
14
|
+
* The lock will be released if the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method
|
|
15
|
+
* is called, e.g. by breaking out of the loop.
|
|
16
|
+
*
|
|
17
|
+
* By default, calling the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method will also
|
|
18
|
+
* cancel the stream. To prevent this, use the stream's {@link ReadableStream.values | values()} method, passing
|
|
19
|
+
* `true` for the `preventCancel` option.
|
|
20
|
+
*/
|
|
21
|
+
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* {@inheritDoc ReadableStream.values}
|
|
25
|
+
*/
|
|
26
|
+
[Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<R>;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|