@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
1 lines • 1.65 kB
Source Map (JSON)
{"version":3,"sources":["add/iterable-operators/tonodestream.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAc/D,MAAM,UAAU,iBAAiB,CAE/B,OAAyB;IAEzB,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,KAAK,IAAI;QAC5C,CAAC,CAAC,IAAI,gBAAgB,CAAU,IAAI,EAAE,OAAO,CAAC;QAC9C,CAAC,CAAC,IAAI,gBAAgB,CAA6C,IAAI,EAAE,OAAO,CAAC,CAAC;AACtF,CAAC;AAED,SAAS,CAAC,SAAS,CAAC,YAAY,GAAG,iBAAiB,CAAC","file":"tonodestream.js","sourcesContent":["import { ReadableOptions } from 'stream';\nimport { BufferLike } from '../../interfaces';\nimport { IterableX } from '../../iterable/iterablex';\nimport { IterableReadable } from '../../iterable/tonodestream';\n\n/**\n * @ignore\n */\nexport function toNodeStreamProto<TSource>(this: Iterable<TSource>): IterableReadable<TSource>;\nexport function toNodeStreamProto<TSource>(\n this: Iterable<TSource>,\n options: ReadableOptions | { objectMode: true }\n): IterableReadable<TSource>;\nexport function toNodeStreamProto<TSource extends BufferLike>(\n this: Iterable<TSource>,\n options: ReadableOptions | { objectMode: false }\n): IterableReadable<TSource>;\nexport function toNodeStreamProto<TSource>(\n this: Iterable<any>,\n options?: ReadableOptions\n): IterableReadable<TSource> {\n return !options || options.objectMode === true\n ? new IterableReadable<TSource>(this, options)\n : new IterableReadable<TSource extends BufferLike ? TSource : any>(this, options);\n}\n\nIterableX.prototype.toNodeStream = toNodeStreamProto;\n\ndeclare module '../../iterable/iterablex' {\n interface IterableX<T> {\n toNodeStream: typeof toNodeStreamProto;\n }\n}\n"]}