Surface / foldkit-surface/declared

SupplyTable

type · packages/surface/src/declared.ts:48

type SupplyTable<Transitions, Message> = {
  readonly [K in SuppliedTag<Transitions>]: (
    message: Extract<
      Message,
      {
        readonly _tag: K
      }
    >,
  ) => SuppliedOf<Transitions[K]>
}

For each transition that declares supplied values (a time, a new id), how to make them for one step of its Message. Each runs once per step, before the transition, and what it returns is checked against the transition's supplied Schemas.