Optional
id: stringReadonly
disabledReadonly
idProtected
sourceCreate a cell the value of which is true if this cell's value is not null or undefined, false otherwise.
A cell.
Create a cell that negates the value of this cell using the !
operator.
A negating cell.
Create a cell the value of which is true if this cell's value is null or undefined, false otherwise.
A cell.
Protected
addConvert this cell to an immutable cell. The resulting will no longer be
an instance of MutCell
but will still update its value whenever this
cell is updated.
Optional
onrejected: (reason: unknown) => voidGet the cells current value and attach an observer. The observer function is called once with the current value immediately upon calling this method.
The observer is attached before it's called with the current value of the cell.
The observer function to attach.
A function that can be called to detach the observer. Alternatively unobserve can be called.
Create a cell that applies a function to the value of this cell.
The function will be called whenever the value property of the resulting cell is accessed. If the resulting cell is being observed, the function will also be called once each time the value of this cell changes.
The function to apply to the cell value.
A cell.
Create a cell that applies a function to the value of this cell, but only
when the value is not null
or undefined
.
The function will be called whenever the value property of the resulting cell is accessed. If the resulting cell is being observed, the function will also be called once each time the value of this cell changes.
The function apply to the cell value.
A mapping cell.
Attach an observer.
The observer function to attach.
A function that can be called to detach the observer. Alternatively unobserve can be called.
Create a promise that resolves with the first non-null, non-undefined value of this cell. If the value of this cell is not null or undefined the method returns a resolved Promise with the value.
A promise that resolves when the value of this cell is not null or undefined.
Detach an observer.
The observer function to detach.
Static
fromCreate a cell from an existing observable (e.g. an Emitter) and an initial value.
N.B. Unless observed, the value of the resulting cell will not update when the observable emits events.
An observable.
The initial value of the cell.
A cell.