{"version":3,"file":"max.js","sourceRoot":"","sources":["../../src/operator/max.ts"],"names":[],"mappings":";AACA,oBAAsC,kBAAkB,CAAC,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,aAA4C,QAAiC;IAC3E,MAAM,CAAC,SAAc,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAFe,WAAG,MAElB,CAAA","sourcesContent":["import { Observable } from '../Observable';\nimport { max as higherOrderMax } from '../operators/max';\n\n/**\n * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function),\n * and when source Observable completes it emits a single item: the item with the largest value.\n *\n * \n *\n * @example Get the maximal value of a series of numbers\n * Rx.Observable.of(5, 4, 7, 2, 8)\n * .max()\n * .subscribe(x => console.log(x)); // -> 8\n *\n * @example Use a comparer function to get the maximal item\n * interface Person {\n * age: number,\n * name: string\n * }\n * Observable.of({age: 7, name: 'Foo'},\n * {age: 5, name: 'Bar'},\n * {age: 9, name: 'Beer'})\n * .max((a: Person, b: Person) => a.age < b.age ? -1 : 1)\n * .subscribe((x: Person) => console.log(x.name)); // -> 'Beer'\n * }\n *\n * @see {@link min}\n *\n * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the\n * value of two items.\n * @return {Observable} An Observable that emits item with the largest value.\n * @method max\n * @owner Observable\n */\nexport function max(this: Observable, comparer?: (x: T, y: T) => number): Observable {\n return higherOrderMax(comparer)(this);\n}\n"]}