From 4a49e6a314038f40ce5383e51bacce80a9b32787 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 28 Apr 2022 23:03:30 +0300 Subject: [PATCH] Generalize fields to all is()ables --- packages/core/src/runtime/actor.ts | 2 +- packages/core/src/runtime/dataflow.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/runtime/actor.ts b/packages/core/src/runtime/actor.ts index cffddda..91046e0 100644 --- a/packages/core/src/runtime/actor.ts +++ b/packages/core/src/runtime/actor.ts @@ -369,7 +369,7 @@ export class Turn { this.enqueue(this.activeFacet.actor.root, () => this.activeFacet.actor._terminateWith({ ok: false, err })); } - field, T = Ref>(initial: V, name?: string): Field { + field(initial: V, name?: string): Field { return new Field(this.activeFacet.actor.dataflowGraph, initial, name); } diff --git a/packages/core/src/runtime/dataflow.ts b/packages/core/src/runtime/dataflow.ts index bb1aec7..28420fa 100644 --- a/packages/core/src/runtime/dataflow.ts +++ b/packages/core/src/runtime/dataflow.ts @@ -142,7 +142,7 @@ export abstract class TypedCell extends Cell { abstract valuesEqual(v1: V, v2: V): boolean; } -export class Field, T = Ref> extends TypedCell { +export class Field extends TypedCell { readonly name: string | undefined; constructor(graph: ObservingGraph, initial: V, name?: string) {