| 4 | * @internal |
| 5 | */ |
| 6 | export interface Cell<A> { |
| 7 | readonly get: () => A |
| 8 | /** Skips a value `equals` the current one. */ |
| 9 | readonly set: (value: A) => void |
| 10 | readonly subscribe: (listener: (value: A) => void) => () => void |
| 11 | } |
| 12 | |
| 13 | /** @internal */ |
| 14 | export const cell = <A>( |