Skip to content

@ue-too/board / index / Observable

介面: Observable<T>

定義於: packages/board/src/utils/observable.ts:71

Interface for the Observable pattern implementation.

備註

Observables allow multiple observers to subscribe and receive notifications when data is emitted. This is the pub-sub pattern for event handling.

Implementations can be synchronous or asynchronous:

型別參數

T

T extends any[]

Tuple type of data emitted to observers

方法

notify()

notify(...data): void

定義於: packages/board/src/utils/observable.ts:73

參數

data

...T

回傳

void


subscribe()

subscribe(observer, options?): () => void

定義於: packages/board/src/utils/observable.ts:72

參數

observer

Observer<T>

options?

SubscriptionOptions

回傳

(): void

回傳

void