在combineLatest到mapTo时得到错误

时间:2018-02-15 22:14:39

标签: rxjs reactive-programming rxjs5 redux-observable

export function handleAction(action$) {
    return combineLatest(
                    action$.ofType(actions.LAYOUT_READY),
                action$.ofType(actions.LOADING))
        .mapTo(lastViewedPending())
        .mergeMap((action)=> {
            return leadService.getLastPxls()
                .map(items => lastViewedSucceed(items))
                .startWith(action)
        });
}

我收到错误:

  TS2345: Argument of type 'LAST_VIEWED_PENDING' is not assignable to parameter of type 'IScheduler | LAST_VIEWED_SUCCESS'.

类型'LAST_VIEWED_PENDING'不能指定为'LAST_VIEWED_SUCCESS'类型。     “LAST_VIEWED_PENDING”类型中缺少属性“有效负载”。

我正在使用redux-observable

0 个答案:

没有答案