diff --git a/src/index.ts b/src/index.ts index 327dafd24..d3866fcc9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -192,6 +192,7 @@ export * from './util/locking/WrappedExpiringResourceLocker'; // Util export * from './util/AsyncHandler'; export * from './util/ContentTypes'; +export * from './util/GuardedStream'; export * from './util/HeaderUtil'; export * from './util/PathUtil'; export * from './util/QuadUtil'; diff --git a/src/util/GuardedStream.ts b/src/util/GuardedStream.ts index 4be44e393..6b55376bb 100644 --- a/src/util/GuardedStream.ts +++ b/src/util/GuardedStream.ts @@ -25,9 +25,9 @@ interface StoredErrorStream extends NodeJS.EventEmitter { } /** - * A stream that is guarded. - * This means that if this stream emits an error before a listener is attached, - * it will store the error and emit it once a listener is added. + * A stream that is guarded from emitting errors when there are no listeners. + * If an error occurs while no listener is attached, + * it will store the error and emit it once a listener is added (or a timeout occurs). */ export type Guarded = T & Guard;