web-streams-polyfill 3.0.2 → 3.0.3

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.
@@ -144,7 +144,7 @@ export declare class ReadableStream<R = any> {
144
144
  * The supplied `reason` argument will be given to the underlying source's {@link UnderlyingSource.cancel | cancel()}
145
145
  * method, which might or might not use it.
146
146
  */
147
- cancel(reason?: any): Promise<void>;
147
+ cancel(reason?: any): Promise<undefined>;
148
148
  /**
149
149
  * Creates a {@link ReadableStreamBYOBReader} and locks the stream to the new reader.
150
150
  *
@@ -181,7 +181,7 @@ export declare class ReadableStream<R = any> {
181
181
  *
182
182
  * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
183
183
  */
184
- pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
184
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<undefined>;
185
185
  /**
186
186
  * Tees this readable stream, returning a two-element array containing the two resulting branches as
187
187
  * new {@link ReadableStream} instances.
@@ -233,11 +233,11 @@ export declare class ReadableStreamBYOBReader {
233
233
  * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
234
234
  * the reader's lock is released before the stream finishes closing.
235
235
  */
236
- readonly closed: Promise<void>;
236
+ readonly closed: Promise<undefined>;
237
237
  /**
238
238
  * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.
239
239
  */
240
- cancel(reason?: any): Promise<void>;
240
+ cancel(reason?: any): Promise<undefined>;
241
241
  /**
242
242
  * Attempts to reads bytes into view, and returns a promise resolved with the result.
243
243
  *
@@ -333,11 +333,11 @@ export declare class ReadableStreamDefaultReader<R = any> {
333
333
  * Returns a promise that will be fulfilled when the stream becomes closed,
334
334
  * or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing.
335
335
  */
336
- readonly closed: Promise<void>;
336
+ readonly closed: Promise<undefined>;
337
337
  /**
338
338
  * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.
339
339
  */
340
- cancel(reason?: any): Promise<void>;
340
+ cancel(reason?: any): Promise<undefined>;
341
341
  /**
342
342
  * Returns a promise that allows access to the next chunk from the stream's internal queue, if available.
343
343
  *
@@ -649,7 +649,7 @@ export declare class WritableStream<W = any> {
649
649
  * that there was an error doing so. Additionally, it will reject with a `TypeError` (without attempting to cancel
650
650
  * the stream) if the stream is currently locked.
651
651
  */
652
- abort(reason?: any): Promise<void>;
652
+ abort(reason?: any): Promise<undefined>;
653
653
  /**
654
654
  * Closes the stream. The underlying sink will finish processing any previously-written chunks, before invoking its
655
655
  * close behavior. During this time any further attempts to write will fail (without erroring the stream).
@@ -658,7 +658,7 @@ export declare class WritableStream<W = any> {
658
658
  * successfully closes, or rejects if an error is encountered during this process. Additionally, it will reject with
659
659
  * a `TypeError` (without attempting to cancel the stream) if the stream is currently locked.
660
660
  */
661
- close(): Promise<void>;
661
+ close(): Promise<undefined>;
662
662
  /**
663
663
  * Creates a {@link WritableStreamDefaultWriter | writer} and locks the stream to the new writer. While the stream
664
664
  * is locked, no other writer can be acquired until this one is released.
@@ -698,7 +698,7 @@ export declare class WritableStreamDefaultWriter<W = any> {
698
698
  * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
699
699
  * the writer’s lock is released before the stream finishes closing.
700
700
  */
701
- readonly closed: Promise<void>;
701
+ readonly closed: Promise<undefined>;
702
702
  /**
703
703
  * Returns the desired size to fill the stream’s internal queue. It can be negative, if the queue is over-full.
704
704
  * A producer can use this information to determine the right amount of data to write.
@@ -716,15 +716,15 @@ export declare class WritableStreamDefaultWriter<W = any> {
716
716
  * If the stream becomes errored or aborted, or the writer’s lock is released, the returned promise will become
717
717
  * rejected.
718
718
  */
719
- readonly ready: Promise<void>;
719
+ readonly ready: Promise<undefined>;
720
720
  /**
721
721
  * If the reader is active, behaves the same as {@link WritableStream.abort | stream.abort(reason)}.
722
722
  */
723
- abort(reason?: any): Promise<void>;
723
+ abort(reason?: any): Promise<undefined>;
724
724
  /**
725
725
  * If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}.
726
726
  */
727
- close(): Promise<void>;
727
+ close(): Promise<undefined>;
728
728
  /**
729
729
  * Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active.
730
730
  * If the associated stream is errored when the lock is released, the writer will appear errored in the same way from
@@ -745,7 +745,7 @@ export declare class WritableStreamDefaultWriter<W = any> {
745
745
  * Note that what "success" means is up to the underlying sink; it might indicate simply that the chunk has been
746
746
  * accepted, and not necessarily that it is safely saved to its ultimate destination.
747
747
  */
748
- write(chunk: W): Promise<void>;
748
+ write(chunk: W): Promise<undefined>;
749
749
  }
750
750
 
751
751
  export { }
@@ -144,7 +144,7 @@ export declare class ReadableStream<R = any> {
144
144
  * The supplied `reason` argument will be given to the underlying source's {@link UnderlyingSource.cancel | cancel()}
145
145
  * method, which might or might not use it.
146
146
  */
147
- cancel(reason?: any): Promise<void>;
147
+ cancel(reason?: any): Promise<undefined>;
148
148
  /**
149
149
  * Creates a {@link ReadableStreamBYOBReader} and locks the stream to the new reader.
150
150
  *
@@ -181,7 +181,7 @@ export declare class ReadableStream<R = any> {
181
181
  *
182
182
  * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
183
183
  */
184
- pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
184
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<undefined>;
185
185
  /**
186
186
  * Tees this readable stream, returning a two-element array containing the two resulting branches as
187
187
  * new {@link ReadableStream} instances.
@@ -233,11 +233,11 @@ export declare class ReadableStreamBYOBReader {
233
233
  * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
234
234
  * the reader's lock is released before the stream finishes closing.
235
235
  */
236
- get closed(): Promise<void>;
236
+ get closed(): Promise<undefined>;
237
237
  /**
238
238
  * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.
239
239
  */
240
- cancel(reason?: any): Promise<void>;
240
+ cancel(reason?: any): Promise<undefined>;
241
241
  /**
242
242
  * Attempts to reads bytes into view, and returns a promise resolved with the result.
243
243
  *
@@ -333,11 +333,11 @@ export declare class ReadableStreamDefaultReader<R = any> {
333
333
  * Returns a promise that will be fulfilled when the stream becomes closed,
334
334
  * or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing.
335
335
  */
336
- get closed(): Promise<void>;
336
+ get closed(): Promise<undefined>;
337
337
  /**
338
338
  * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.
339
339
  */
340
- cancel(reason?: any): Promise<void>;
340
+ cancel(reason?: any): Promise<undefined>;
341
341
  /**
342
342
  * Returns a promise that allows access to the next chunk from the stream's internal queue, if available.
343
343
  *
@@ -649,7 +649,7 @@ export declare class WritableStream<W = any> {
649
649
  * that there was an error doing so. Additionally, it will reject with a `TypeError` (without attempting to cancel
650
650
  * the stream) if the stream is currently locked.
651
651
  */
652
- abort(reason?: any): Promise<void>;
652
+ abort(reason?: any): Promise<undefined>;
653
653
  /**
654
654
  * Closes the stream. The underlying sink will finish processing any previously-written chunks, before invoking its
655
655
  * close behavior. During this time any further attempts to write will fail (without erroring the stream).
@@ -658,7 +658,7 @@ export declare class WritableStream<W = any> {
658
658
  * successfully closes, or rejects if an error is encountered during this process. Additionally, it will reject with
659
659
  * a `TypeError` (without attempting to cancel the stream) if the stream is currently locked.
660
660
  */
661
- close(): Promise<void>;
661
+ close(): Promise<undefined>;
662
662
  /**
663
663
  * Creates a {@link WritableStreamDefaultWriter | writer} and locks the stream to the new writer. While the stream
664
664
  * is locked, no other writer can be acquired until this one is released.
@@ -698,7 +698,7 @@ export declare class WritableStreamDefaultWriter<W = any> {
698
698
  * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
699
699
  * the writer’s lock is released before the stream finishes closing.
700
700
  */
701
- get closed(): Promise<void>;
701
+ get closed(): Promise<undefined>;
702
702
  /**
703
703
  * Returns the desired size to fill the stream’s internal queue. It can be negative, if the queue is over-full.
704
704
  * A producer can use this information to determine the right amount of data to write.
@@ -716,15 +716,15 @@ export declare class WritableStreamDefaultWriter<W = any> {
716
716
  * If the stream becomes errored or aborted, or the writer’s lock is released, the returned promise will become
717
717
  * rejected.
718
718
  */
719
- get ready(): Promise<void>;
719
+ get ready(): Promise<undefined>;
720
720
  /**
721
721
  * If the reader is active, behaves the same as {@link WritableStream.abort | stream.abort(reason)}.
722
722
  */
723
- abort(reason?: any): Promise<void>;
723
+ abort(reason?: any): Promise<undefined>;
724
724
  /**
725
725
  * If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}.
726
726
  */
727
- close(): Promise<void>;
727
+ close(): Promise<undefined>;
728
728
  /**
729
729
  * Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active.
730
730
  * If the associated stream is errored when the lock is released, the writer will appear errored in the same way from
@@ -745,7 +745,7 @@ export declare class WritableStreamDefaultWriter<W = any> {
745
745
  * Note that what "success" means is up to the underlying sink; it might indicate simply that the chunk has been
746
746
  * accepted, and not necessarily that it is safely saved to its ultimate destination.
747
747
  */
748
- write(chunk: W): Promise<void>;
748
+ write(chunk: W): Promise<undefined>;
749
749
  }
750
750
 
751
751
  export { }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.9.2"
8
+ "packageVersion": "7.13.4"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-streams-polyfill",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Web Streams, based on the WHATWG spec reference implementation",
5
5
  "main": "dist/polyfill",
6
6
  "browser": "dist/polyfill.min.js",
@@ -54,23 +54,23 @@
54
54
  },
55
55
  "homepage": "https://github.com/MattiasBuelens/web-streams-polyfill#readme",
56
56
  "devDependencies": {
57
- "@microsoft/api-extractor": "^7.9.2",
57
+ "@microsoft/api-extractor": "^7.13.4",
58
58
  "@rollup/plugin-inject": "^4.0.2",
59
- "@rollup/plugin-replace": "^2.3.3",
59
+ "@rollup/plugin-replace": "^2.4.2",
60
60
  "@rollup/plugin-strip": "^2.0.0",
61
- "@rollup/plugin-typescript": "^5.0.2",
62
- "@types/node": "^12.12.50",
63
- "@typescript-eslint/eslint-plugin": "^3.6.1",
64
- "@typescript-eslint/parser": "^3.6.1",
65
- "@ungap/promise-all-settled": "^1.1.0",
66
- "eslint": "^7.5.0",
67
- "jasmine": "^3.5.0",
61
+ "@rollup/plugin-typescript": "^8.2.1",
62
+ "@types/node": "^14.14.37",
63
+ "@typescript-eslint/eslint-plugin": "^4.21.0",
64
+ "@typescript-eslint/parser": "^4.21.0",
65
+ "@ungap/promise-all-settled": "^1.1.2",
66
+ "eslint": "^7.23.0",
67
+ "jasmine": "^3.7.0",
68
68
  "micromatch": "^4.0.2",
69
- "rollup": "^2.22.1",
70
- "rollup-plugin-terser": "^6.1.0",
71
- "ts-morph": "^7.1.2",
72
- "tslib": "^2.0.0",
73
- "typescript": "^3.9.7",
74
- "wpt-runner": "^3.2.0"
69
+ "rollup": "^2.44.0",
70
+ "rollup-plugin-terser": "^7.0.2",
71
+ "ts-morph": "^10.0.2",
72
+ "tslib": "^2.2.0",
73
+ "typescript": "^4.2.4",
74
+ "wpt-runner": "^3.2.1"
75
75
  }
76
76
  }