ix
Version:
The Interactive Extensions for JavaScript
1 lines • 1.76 kB
Source Map (JSON)
{"version":3,"sources":["add/asynciterable-operators/tonodestream.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAgBzE,MAAM,UAAU,iBAAiB,CAE/B,OAAyB;IAEzB,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,KAAK,IAAI;QAC5C,CAAC,CAAC,IAAI,qBAAqB,CAAU,IAAI,EAAE,OAAO,CAAC;QACnD,CAAC,CAAC,IAAI,qBAAqB,CAA6C,IAAI,EAAE,OAAO,CAAC,CAAC;AAC3F,CAAC;AAED,cAAc,CAAC,SAAS,CAAC,YAAY,GAAG,iBAAiB,CAAC","file":"tonodestream.js","sourcesContent":["import { ReadableOptions } from 'stream';\nimport { BufferLike } from '../../interfaces';\nimport { AsyncIterableX } from '../../asynciterable/asynciterablex';\nimport { AsyncIterableReadable } from '../../asynciterable/tonodestream';\n\n/**\n * @ignore\n */\nexport function toNodeStreamProto<TSource>(\n this: AsyncIterable<TSource>\n): AsyncIterableReadable<TSource>;\nexport function toNodeStreamProto<TSource>(\n this: AsyncIterable<TSource>,\n options: ReadableOptions & { objectMode: true }\n): AsyncIterableReadable<TSource>;\nexport function toNodeStreamProto<TSource extends BufferLike>(\n this: AsyncIterable<TSource>,\n options: ReadableOptions & { objectMode: false }\n): AsyncIterableReadable<TSource>;\nexport function toNodeStreamProto<TSource>(\n this: AsyncIterable<any>,\n options?: ReadableOptions\n): AsyncIterableReadable<TSource> {\n return !options || options.objectMode === true\n ? new AsyncIterableReadable<TSource>(this, options)\n : new AsyncIterableReadable<TSource extends BufferLike ? TSource : any>(this, options);\n}\n\nAsyncIterableX.prototype.toNodeStream = toNodeStreamProto;\n\ndeclare module '../../asynciterable/asynciterablex' {\n interface AsyncIterableX<T> {\n toNodeStream: typeof toNodeStreamProto;\n }\n}\n"]}