ix
Version: 
The Interactive Extensions for JavaScript
1 lines • 976 B
Source Map (JSON)
{"version":3,"sources":["add/asynciterable-operators/maxby.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD;;GAEG;AACH,MAAM,UAAU,UAAU,CAExB,WAAiD,EACjD,QAAyD;IAEzD,OAAO,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAED,cAAc,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,CAAC","file":"maxby.js","sourcesContent":["import { AsyncIterableX } from '../../asynciterable/asynciterablex';\nimport { maxBy } from '../../asynciterable/maxby';\n\n/**\n * @ignore\n */\nexport function maxByProto<TSource, TKey>(\n  this: AsyncIterableX<TSource>,\n  keySelector: (x: TSource) => TKey | Promise<TKey>,\n  comparer?: (x: TKey, y: TKey) => number | Promise<number>\n): AsyncIterableX<TSource> {\n  return maxBy(this, keySelector, comparer);\n}\n\nAsyncIterableX.prototype.maxBy = maxByProto;\n\ndeclare module '../../asynciterable/asynciterablex' {\n  interface AsyncIterableX<T> {\n    maxBy: typeof maxByProto;\n  }\n}\n"]}