diff --git a/source/index.ts b/source/index.ts index 90ca4c6..6cb8159 100644 --- a/source/index.ts +++ b/source/index.ts @@ -1,5 +1,6 @@ /// /// +/// export type Class = new (...args: any[]) => T; @@ -330,8 +331,9 @@ is.observable = (value: unknown): value is ObservableLike => { return false; }; -// eslint-disable-next-line @typescript-eslint/ban-types -export type NodeStream = object & {readonly pipe: Function}; +export interface NodeStream extends NodeJS.EventEmitter { + pipe(destination: T, options?: {end?: boolean}): T; +} is.nodeStream = (value: unknown): value is NodeStream => is.object(value) && is.function_((value as NodeStream).pipe) && !is.observable(value);