Generalize fields to all is()ables
This commit is contained in:
parent
dae63d6961
commit
4a49e6a314
|
@ -369,7 +369,7 @@ export class Turn {
|
|||
this.enqueue(this.activeFacet.actor.root, () => this.activeFacet.actor._terminateWith({ ok: false, err }));
|
||||
}
|
||||
|
||||
field<V extends Value<T>, T = Ref>(initial: V, name?: string): Field<V, T> {
|
||||
field<V>(initial: V, name?: string): Field<V> {
|
||||
return new Field(this.activeFacet.actor.dataflowGraph, initial, name);
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ export abstract class TypedCell<V> extends Cell {
|
|||
abstract valuesEqual(v1: V, v2: V): boolean;
|
||||
}
|
||||
|
||||
export class Field<V extends Value<T>, T = Ref> extends TypedCell<V> {
|
||||
export class Field<V> extends TypedCell<V> {
|
||||
readonly name: string | undefined;
|
||||
|
||||
constructor(graph: ObservingGraph<Cell>, initial: V, name?: string) {
|
||||
|
|
Loading…
Reference in New Issue