From 180b70dab08c1efdff879ea446fc498bb6a5a3d5 Mon Sep 17 00:00:00 2001 From: Tom Anderson Date: Wed, 12 Feb 2025 16:15:30 +1100 Subject: [PATCH] fix: export `WindpipeConsumptionError` export --- .changeset/eight-forks-buy.md | 5 +++++ src/index.ts | 2 -- src/stream/base.ts | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/eight-forks-buy.md diff --git a/.changeset/eight-forks-buy.md b/.changeset/eight-forks-buy.md new file mode 100644 index 0000000..9b277ec --- /dev/null +++ b/.changeset/eight-forks-buy.md @@ -0,0 +1,5 @@ +--- +"windpipe": patch +--- + +fix: export for WindpipeConsumptionError diff --git a/src/index.ts b/src/index.ts index d59bda7..c95b12a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,6 +17,4 @@ export type { // Re-export useful utility types export type { MaybePromise, Truthy, CallbackOrStream, NodeCallback } from "./util"; -export { WindpipeConsumptionError } from "./stream"; - export default Stream; diff --git a/src/stream/base.ts b/src/stream/base.ts index 1d6e88a..55af6c5 100644 --- a/src/stream/base.ts +++ b/src/stream/base.ts @@ -1,5 +1,5 @@ import { normalise, type Atom, type MaybeAtom, error, exception } from "../atom"; -import { Stream } from "."; +import { Stream, WindpipeConsumptionError } from "."; import { Readable, Writable } from "stream"; import { createNodeCallback, newSignal, type NodeCallback } from "../util"; @@ -18,6 +18,8 @@ export class StreamBase { */ static StreamEnd = Symbol.for("STREAM_END"); + static WindpipeConsumptionError = WindpipeConsumptionError; + constructor(stream: Readable) { this.stream = stream; }