UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

1 lines 1.61 kB
{"version":3,"sources":["asynciterable/operators/todomstream.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,mBAAmB,EAGnC,MAAM,iCAAiC,CAAC;AAazC,MAAM,UAAU,WAAW,CACzB,OAAsF;IAEtF,OAAO,SAAS,2BAA2B,CAAC,MAA0B;QACpE,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,OAAO,EAAE;YACnE,OAAO,mBAAmB,CAAC,MAAM,EAAE,OAA2C,CAAC,CAAC;SACjF;QACD,OAAO,mBAAmB,CAAC,MAAM,EAAE,OAEN,CAAC,CAAC;IACjC,CAAC,CAAC;AACJ,CAAC","file":"todomstream.js","sourcesContent":["import {\n toDOMStream as toDOMStreamOperator,\n ReadableBYOBStreamOptions,\n ReadableByteStreamOptions\n} from '../../asynciterable/todomstream';\n\nimport { UnaryFunction } from '../../interfaces';\n\nexport function toDOMStream<T>(\n strategy?: QueuingStrategy<T>\n): UnaryFunction<AsyncIterable<T>, ReadableStream<T>>;\nexport function toDOMStream<T>(\n options: ReadableBYOBStreamOptions<Uint8Array>\n): UnaryFunction<AsyncIterable<T>, ReadableStream<Uint8Array>>;\nexport function toDOMStream<T>(\n options: ReadableByteStreamOptions<Uint8Array>\n): UnaryFunction<AsyncIterable<T>, ReadableStream<Uint8Array>>;\nexport function toDOMStream(\n options?: QueuingStrategy<any> | ReadableBYOBStreamOptions | ReadableByteStreamOptions\n) {\n return function toDOMStreamOperatorFunction(source: AsyncIterable<any>) {\n if (!options || !('type' in options) || options['type'] !== 'bytes') {\n return toDOMStreamOperator(source, options as QueuingStrategy<any> | undefined);\n }\n return toDOMStreamOperator(source, options as\n | ReadableBYOBStreamOptions\n | ReadableByteStreamOptions);\n };\n}\n"]}