From a7b917d284ca332d241eaeecddb66ef46342a494 Mon Sep 17 00:00:00 2001 From: Amir Date: Thu, 11 Jan 2024 20:28:27 -0700 Subject: [PATCH] Experiment with importing webstreams --- packages/trie/src/util/readStream.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/trie/src/util/readStream.ts b/packages/trie/src/util/readStream.ts index 5ad66e21a6..b3389ef716 100644 --- a/packages/trie/src/util/readStream.ts +++ b/packages/trie/src/util/readStream.ts @@ -1,3 +1,4 @@ +import { ReadableStream } from 'node:stream/web' import { Readable } from 'readable-stream' import { BranchNode, LeafNode } from '../node/index.js' @@ -14,6 +15,8 @@ export class TrieReadStream extends Readable { constructor(trie: Trie) { super({ objectMode: true }) + const s = new ReadableStream() + void s.cancel() this.trie = trie this._started = false }