FamilyFactory: (graph: FamilyGraph, key: string) => Node<T>

Factory that produces (and registers, via graph.input / graph.derived) a node for a given key.

Type Parameters

  • T

    Value type of the node the factory returns.

Type declaration

    • (graph: FamilyGraph, key: string): Node<T>
    • Parameters

      • graph: FamilyGraph

        The provider-scoped engine handle, narrowed to the registration capability (FamilyGraph). The factory is expected to call graph.input(...) or graph.derived(...) exactly once and return the resulting handle. Methods outside the narrow surface (commit, hydrate, snapshot, subscribeCommits, …) are intentionally unreachable from here — they are not the factory's responsibility.

      • key: string

        The keying identity passed to the hook.

      Returns Node<T>

      The freshly-registered node handle.