【问题标题】:TypeScript error "The 'this' context of type 'void' is not assignable to method's 'this' of type 'Observable<unknown>'??"TypeScript 错误“'void' 类型的 'this' 上下文不可分配给 'Observable<unknown>' 类型的方法的 'this'??”
【发布时间】:2022-06-12 12:46:04
【问题描述】:

// 监听搜索字段值变化

this.selectedRuleFilterCtrl.valueChanges.pipe(takeUntil(this._onDestroy)).subscribe(() => {this.filterRule()});

【问题讨论】:

  • takeUntil RxJs MonoTypeOperatorFunction 期望在您传递 void 类型的参数时传递给它的 Observable。

标签: angular typescript


猜你喜欢
  • 2018-04-22
  • 1970-01-01
  • 2020-07-29
  • 1970-01-01
  • 2020-04-17
  • 2020-07-28
  • 2021-10-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多