UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

1 lines 1.2 kB
{"version":3,"sources":["add/asynciterable-operators/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAcpD,MAAM,UAAU,WAAW,CAEzB,SAAmE;IAEnE,OAAO,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACjC,CAAC;AAED,cAAc,CAAC,SAAS,CAAC,MAAM,GAAG,WAAW,CAAC","file":"single.js","sourcesContent":["import { AsyncIterableX } from '../../asynciterable/asynciterablex';\nimport { single } from '../../asynciterable/single';\n\n/**\n * @ignore\n */\n\nexport function singleProto<T, S extends T>(\n this: AsyncIterableX<T>,\n predicate: (value: T, index: number) => value is S\n): Promise<S | undefined>;\nexport function singleProto<T>(\n this: AsyncIterableX<T>,\n predicate?: (value: T, index: number) => boolean | Promise<boolean>\n): Promise<T | undefined>;\nexport function singleProto<T>(\n this: AsyncIterableX<T>,\n predicate?: (value: T, index: number) => boolean | Promise<boolean>\n): Promise<T | undefined> {\n return single(this, predicate);\n}\n\nAsyncIterableX.prototype.single = singleProto;\n\ndeclare module '../../asynciterable/asynciterablex' {\n interface AsyncIterableX<T> {\n single: typeof singleProto;\n }\n}\n"]}