Surface / foldkit-surface

SurfaceFamily

interface · packages/surface/src/index.ts:735

interface SurfaceFamily<
  Root,
  ParentModel,
  Model,
  Message,
  Params,
> extends SurfaceSource<Root> {
  readonly from: ActiveSurface<Root, ParentModel>
  readonly child: Surface<Root, Model, Message, Params>
  readonly messages: ReadonlyArray<string>
}

One Surface definition instantiated per item of a parent Surface's Model: Surface.each as data. from names the prerequisite — the family resolves no instances until the parent is active — so consumers can tell the requirements needed to discover instances from the requirements of the discovered instances. That distinction is what lets Data.satisfy reach a fixed point: first the parent, then what the parent reveals.

Members

SurfaceFamily.from

property · packages/surface/src/index.ts:742

readonly from: ActiveSurface<Root, ParentModel>

SurfaceFamily.child

property · packages/surface/src/index.ts:743

readonly child: Surface<Root, Model, Message, Params>

SurfaceFamily.messages

property · packages/surface/src/index.ts:745

readonly messages: ReadonlyArray<string>

The tags of the Messages the child Surface lists: what an instance may send.