Skip to main content

SubscribableObserver

@nevermined-io/sdk - v3.0.44 / SubscribableObserver

Class: SubscribableObserver\<T, P>

Type parameters

Name
T
P

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SubscribableObserver\<T, P>(): SubscribableObserver\<T, P>

Type parameters

Name
T
P

Returns

SubscribableObserver\<T, P>

Properties

completed

completed: boolean = false

Defined in

src/utils/SubscribableObserver.ts:2


subscriptions

Private subscriptions: Set\<{ onComplete?: (complete: P) => void ; onError?: (error: any) => void ; onNext?: (next: T) => void }>

Defined in

src/utils/SubscribableObserver.ts:4

Methods

complete

complete(resolve?): void

Parameters

NameType
resolve?P

Returns

void

Defined in

src/utils/SubscribableObserver.ts:30


emit

emit(type, value): void

Parameters

NameType
type"onNext" | "onComplete" | "onError"
valueany

Returns

void

Defined in

src/utils/SubscribableObserver.ts:40


error

error(error?): void

Parameters

NameType
error?any

Returns

void

Defined in

src/utils/SubscribableObserver.ts:35


next

next(next?): void

Parameters

NameType
next?T

Returns

void

Defined in

src/utils/SubscribableObserver.ts:26


subscribe

subscribe(onNext?, onComplete?, onError?): Object

Parameters

NameType
onNext?(next: T) => void
onComplete?(complete: P) => void
onError?(error: any) => void

Returns

Object

NameType
unsubscribe() => boolean

Defined in

src/utils/SubscribableObserver.ts:10


unsubscribe

unsubscribe(): void

Returns

void

Defined in

src/utils/SubscribableObserver.ts:47