Skip to content

Commit 53f54e1

Browse files
authored
Extend BaseStream<> from AsyncIterable<> (#1373)
Both Web ReadableStreams and Node.js streams are async iterable objects.
1 parent e450582 commit 53f54e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openpgp.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ export class PacketList<T extends AnyPacket> extends Array<T> {
531531
/* ############## v5 STREAM #################### */
532532

533533
type Data = Uint8Array | string;
534-
interface BaseStream<T extends Data> { }
534+
interface BaseStream<T extends Data> extends AsyncIterable<T> { }
535535
interface WebStream<T extends Data> extends BaseStream<T> { // copied+simplified version of ReadableStream from lib.dom.d.ts
536536
readonly locked: boolean; getReader: Function; pipeThrough: Function; pipeTo: Function; tee: Function;
537537
cancel(reason?: any): Promise<void>;

0 commit comments

Comments
 (0)