{"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/operator/find.ts"],"names":[],"mappings":";AACA,qBAAoC,mBAAmB,CAAC,CAAA;AASxD,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,cAA6C,SAAsE,EAC3F,OAAa;IACnC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAHe,YAAI,OAGnB,CAAA","sourcesContent":["import { Observable } from '../Observable';\nimport { find as higherOrder } from '../operators/find';\n\n/* tslint:disable:max-line-length */\nexport function find(this: Observable,\n predicate: (value: T, index: number) => value is S,\n thisArg?: any): Observable;\nexport function find(this: Observable,\n predicate: (value: T, index: number) => boolean,\n thisArg?: any): Observable;\n/* tslint:enable:max-line-length */\n\n/**\n * Emits only the first value emitted by the source Observable that meets some\n * condition.\n *\n * Finds the first value that passes some test and emits\n * that.\n *\n * \n *\n * `find` searches for the first item in the source Observable that matches the\n * specified condition embodied by the `predicate`, and returns the first\n * occurrence in the source. Unlike {@link first}, the `predicate` is required\n * in `find`, and does not emit an error if a valid value is not found.\n *\n * @example Find and emit the first click that happens on a DIV element\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.find(ev => ev.target.tagName === 'DIV');\n * result.subscribe(x => console.log(x));\n *\n * @see {@link filter}\n * @see {@link first}\n * @see {@link findIndex}\n * @see {@link take}\n *\n * @param {function(value: T, index: number, source: Observable): boolean} predicate\n * A function called with each item to test for condition matching.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of the first item that matches the\n * condition.\n * @method find\n * @owner Observable\n */\nexport function find(this: Observable, predicate: (value: T, index: number, source: Observable) => boolean,\n thisArg?: any): Observable {\n return higherOrder(predicate, thisArg)(this);\n}\n"]}