js-kubo-rpc-client
js-kubo-rpc-client copied to clipboard
fix: support readable streams as iterable in dag.import
https://github.com/ipfs/js-kubo-rpc-client/blob/1ab7941819dd1a48df653ee159e6983608e72132/src/dag/index.ts#L225
Getting the following error in https://github.com/ipfs/ipfs-webui/pull/2323 when using direct kubo-rpc-client types:
Argument of type 'ReadableStream<Uint8Array<ArrayBufferLike>>' is not assignable to parameter of type 'Iterable<Uint8Array<ArrayBufferLike>> | AsyncIterable<Uint8Array<ArrayBufferLike>> | AsyncIterable<...> | Iterable<...>'.ts(2345)
However, readable streams are iterable in most browsers now (safari currently has a bug):