Type Alias Update<Msg, G>

Update: (msg: Msg, graph: G) => void

The MVU runner's call signature: a function that, given a Msg and the current Graph, performs exactly one graph.commit(...) and returns nothing.

Type Parameters

  • Msg

    The application's message union.

  • G extends Graph = Graph

    The graph subtype, defaulting to Graph.

Type declaration

    • (msg: Msg, graph: G): void
    • Parameters

      Returns void

Graph is a stable handle whose now advances by exactly one tick per commit; the runner does not reconstruct it. The function returns void because the return value carries no information — the caller already holds the same handle, and forgetting to return it (the prior (msg, g) => g shape) would yield undefined and crash the next dispatch. The new shape is imperative-by-design: the handler issues graph.commit(...), end of story.