最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How would I use `do` as an RxJS lettable operator? - Stack Overflow

programmeradmin2浏览0评论

RxJS 5.5 allows grabbing lettable operators and piping them like so:

import { ajax } from 'rxjs/observable/dom/ajax'
import { catchError, map, retry } from 'rxjs/operators'

ajax.getJSON('')
.pipe(
    retry(3, 1000),
    map(fetchUserFulfilled),
    catchError(console.error)
)

How would I use the do operator between these mands?

RxJS 5.5 allows grabbing lettable operators and piping them like so:

import { ajax } from 'rxjs/observable/dom/ajax'
import { catchError, map, retry } from 'rxjs/operators'

ajax.getJSON('https://example./api/test')
.pipe(
    retry(3, 1000),
    map(fetchUserFulfilled),
    catchError(console.error)
)

How would I use the do operator between these mands?

Share Improve this question asked Dec 29, 2017 at 17:08 Kevin GhadyaniKevin Ghadyani 7,3178 gold badges48 silver badges66 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 11

The do operator was renamed in RxJS 5.5 to tap because it collided with the JavaScript do keyword.

For more info see: https://github./ReactiveX/rxjs/blob/master/doc/pipeable-operators.md#pipeable-operators

发布评论

评论列表(0)

  1. 暂无评论