RxJS GroupedObservable

2020-10-13 13:55 更新

一个 Observable 表示值,该值属于由公共键表示的同一组。GroupedObservable 发出的值来自源 Observable。公用密钥可用作 key GroupedObservable 实例上的字段。

class GroupedObservable<K, T> extends Observable {
  constructor(key: K, groupSubject: Subject<T>, refCountSubscription?: RefCountSubscription)
  key: K
  _subscribe(subscriber: Subscriber<T>)

 
  // inherited from index/Observable
  static create: Function
  static if: typeof iif
  static throw: typeof throwError
  constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic)
  _isScalar: boolean
  source: Observable<any>
  operator: Operator<any, T>
  lift<R>(operator: Operator<T, R>): Observable<R>
  subscribe(observerOrNext?: NextObserver<T> | ErrorObserver<T> | CompletionObserver<T> | ((value: T) => void), error?: (error: any) => void, complete?: () => void): Subscription
  _trySubscribe(sink: Subscriber<T>): TeardownLogic
  forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise<void>
  pipe(...operations: OperatorFunction<any, any>[]): Observable<any>
  toPromise(promiseCtor?: PromiseConstructorLike): Promise<T>
}

建设者

constructor(key: K, groupSubject: Subject<T>, refCountSubscription?: RefCountSubscription)参量键类型:K。groupSubject 类型:。SubjectrefCountSubscription 可选的。默认值为 undefined。类型:RefCountSubscription

物产

属性 类型 描述
Key K 在构造函数中声明。

方法

_订阅() _subscribe(subscriber: Subscriber<T>)

参量: 类型:
订阅用户 类型:Subscriber
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号