Skip to content

Interface: PlaySpec

API / @xmachines/play-actor / PlaySpec

Defined in: packages/play-actor/src/abstract-actor.ts:43

XMachines extension of @json-render/core Spec.

Adds contextProps — an explicit allowlist of machine context fields that deriveCurrentView merges into element props as low-priority slots. Only fields named here are ever exposed to components; nothing leaks from context without an opt-in declaration.

Use typedSpec<TContext>(...) at the definition site to validate contextProps entries against your machine’s context type at compile time.

Extends

  • Spec

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
contextProps?readonlyreadonly string[]Explicit allowlist of machine context field names to expose as prop slots. Each named field is merged into every spec element’s props at view derivation time, filling any slot whose current value is undefined. Use typedSpec<TContext>(...) to constrain entries to keyof TContext & string.-packages/play-actor/src/abstract-actor.ts:51
elementspublicRecord<string, UIElement>Flat map of elements by keySpec.elements-
rootpublicstringRoot element keySpec.root-
state?publicRecord<string, unknown>Optional initial state to seed the state model. Components using statePath will read from / write to this state.Spec.state-