W3Cschool
恭喜您成為首批注冊(cè)用戶(hù)
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
Subject 的變體,僅在完成時(shí)才發(fā)出值。完成后,它將向所有觀察者發(fā)出其最新價(jià)值。
class AsyncSubject<T> extends Subject {
_subscribe(subscriber: Subscriber<any>): Subscription
next(value: T): void
error(error: any): void
complete(): void
// inherited from index/Subject
static create: Function
constructor()
observers: Observer<T>[]
closed: false
isStopped: false
hasError: false
thrownError: any
lift<R>(operator: Operator<T, R>): Observable<R>
next(value?: T)
error(err: any)
complete()
unsubscribe()
_trySubscribe(subscriber: Subscriber<T>): TeardownLogic
_subscribe(subscriber: Subscriber<T>): Subscription
asObservable(): Observable<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>
}
訂閱()
_subscribe(subscriber: Subscriber
<any>): Subscription
參量: | 類(lèi)型: |
---|---|
Type | Subscriber |
Returns Subscription
下一個(gè)()
next(value: T): void
參量: | 類(lèi)型: |
---|---|
值 | T |
Returns void
錯(cuò)誤()
參量: | 類(lèi)型: |
---|---|
error | any |
Returnsvoid
完成() |
---|
complete(): void 參量沒(méi)有參數(shù)。Returnsvoid |
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話(huà):173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: