本文整理匯總了TypeScript中b-o-a.O.combineLatest方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript O.combineLatest方法的具體用法?TypeScript O.combineLatest怎麽用?TypeScript O.combineLatest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類b-o-a.O
的用法示例。
在下文中一共展示了O.combineLatest方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: counter
const handler: Handler = (action$: O<A<any>>, options: any): O<A<any>> => {
return O.combineLatest<State>(
counter(action$, { count: 0 }),
(counter) => ({ counter })
)
.map(state => create(state));
};
示例2: getDefaultState
const $ = (action$: O<A<any>>, state: State): O<State> => {
const s = (state ? state : getDefaultState());
return O
.combineLatest(
currentPage$(s.currentPage, action$),
signIn$(s.signIn, action$),
token$(s.token, action$),
spots$(s.spots, action$),
spotForm$(s.spotForm, action$),
stampRallies$(s.stampRallies, action$),
stampRally$(s.stampRally, action$),
stampRallyForm$(s.stampRallyForm, action$),
(
currentPage,
signIn,
token,
spots,
spotForm,
stampRallies,
stampRally,
stampRallyForm
): State => {
return Object.assign({}, s, {
currentPage,
signIn,
token,
spots,
spotForm,
stampRallies,
stampRally,
stampRallyForm
});
}
)
.do(console.log.bind(console)) // logger for state
.share();
};