import { ReadableOptions } from 'stream' ; import { IterableReadable } from '../../iterable/tonodestream' ; import { BufferLike , UnaryFunction } from '../../interfaces' ; export function toNodeStream < TSource > ( ) ; export function toNodeStream < TSource > ( options ) ; export function toNodeStream < TSource extends BufferLike > ( options ) ; export function toNodeStream < TSource > ( options ? ) { return function toNodeStreamOperatorFunction ( source ) : IterableReadable < TSource > { return ! options || options . objectMode === true ? new IterableReadable < TSource > ( source , options ) : new IterableReadable < TSource extends BufferLike ? TSource : any > ( source , options ) ; } ; }