我最近从 Angular 5 更新到 Angular 6。
我收到了这个警告combineLatest is deprecated: resultSelector no longer supported, pipe to map instead
。Rxjs 是 6.1.0 版本,tslint 是 5.10.0,Angular CLI 是 6.0.0 和 Typescript 2.7.2。我这样使用它:
const a$ = combineLatest(
this.aStore.select(b.getAuth),
this.cStore.select(b.getUrl),
(auth, url) => ({auth, url}),
);
我也试过这样:
empty().pipe(
combineLatest(...),
...
)
但这给了我:combineLatest is deprecated: Deprecated in favor of static combineLatest
并且 empty 也被弃用,取而代之的是它的静态版本。