From 53f54e1e1975ea38a9f02c84eb817a67ec334dd7 Mon Sep 17 00:00:00 2001 From: Nick Darvey Date: Thu, 15 Jul 2021 21:09:29 +1000 Subject: [PATCH] Extend BaseStream<> from AsyncIterable<> (#1373) Both Web ReadableStreams and Node.js streams are async iterable objects. --- openpgp.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpgp.d.ts b/openpgp.d.ts index a0c418aa..be7f12e7 100644 --- a/openpgp.d.ts +++ b/openpgp.d.ts @@ -531,7 +531,7 @@ export class PacketList extends Array { /* ############## v5 STREAM #################### */ type Data = Uint8Array | string; -interface BaseStream { } +interface BaseStream extends AsyncIterable { } interface WebStream extends BaseStream { // copied+simplified version of ReadableStream from lib.dom.d.ts readonly locked: boolean; getReader: Function; pipeThrough: Function; pipeTo: Function; tee: Function; cancel(reason?: any): Promise;