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; }