Method signature Subscribable.subscribe

Allows a callback to be added. This callback will be called whenever the value is updated.

Signature

subscribe(callback: (value: T) => void): () => void;

Details

Optional No

Parameters

Name Type Optional Description
callback (value: T) => void No

Returns

() => void

An unsubscribe function.