1 |
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/operator/retry.ts"],"names":[],"mappings":";AACA,sBAAqC,oBAAoB,CAAC,CAAA;AAE1D;;;;;;;;;;;;;;;GAeG;AACH,eAA8C,KAAkB;IAAlB,qBAAkB,GAAlB,SAAiB,CAAC;IAC9D,MAAM,CAAC,aAAW,CAAC,KAAK,CAAC,CAAC,IAAI,CAAkB,CAAC;AACnD,CAAC;AAFe,aAAK,QAEpB,CAAA","sourcesContent":["import { Observable } from '../Observable';\nimport { retry as higherOrder } from '../operators/retry';\n\n/**\n * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable\n * calls `error`, this method will resubscribe to the source Observable for a maximum of `count` resubscriptions (given\n * as a number parameter) rather than propagating the `error` call.\n *\n * <img src=\"./img/retry.png\" width=\"100%\">\n *\n * Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted\n * during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second\n * time and emits: [1, 2, 3, 4, 5] then the complete stream of emissions and notifications\n * would be: [1, 2, 1, 2, 3, 4, 5, `complete`].\n * @param {number} count - Number of retry attempts before failing.\n * @return {Observable} The source Observable modified with the retry logic.\n * @method retry\n * @owner Observable\n */\nexport function retry<T>(this: Observable<T>, count: number = -1): Observable<T> {\n return higherOrder(count)(this) as Observable<T>;\n}\n"]}
|