readonly
Motivation
The method allows to convert writable store and callable event to their readonly versions. It can be helpful to create more strict public api.
Formulae
$result
store contains mapped$store
, which is readonly for consumers.
result
event contains mappedevent
, which is not callable by consumers.
Arguments
value: Store<T>|Event<T>
— Any store or event, that required to be readonly
Returns
result: Store<T>|Event<T>
Note: if passed argument is already derived, then argument returns as-is.