rxjs5 takeUntil现在允许传递Subject ... TypeScript错误

时间:2017-01-02 16:55:36

标签: angular rxjs rxjs5

所以突然(在运行npm update之后)我收到了这个新错误:

Error:(109, 30) TS2345:Argument of type 'Subject<any>' is not assignable to parameter of type 'Observable<any>'.
  Property 'source' is protected but type 'Observable<T>' is not a class derived from 'Observable<T>'.

关于此代码:

private totalPlayersSubject$: Subject<any> = new Subject();
...

items$.takeUntil(this.totalPlayersSubject$).subscribe((x) => {
                    this.m_stations = List<any>(x);
                    this.cd.markForCheck();
                }
            )

为什么有任何想法?因为我正在传递一个主题,因为它是有效的AFAIK ......

谢谢, 肖恩

0 个答案:

没有答案