Skip to content

Function: validateComponentBinding()

Documentation / @xmachines/play-xstate / validateComponentBinding

function validateComponentBinding(view, catalog): void;

Defined in: packages/play-xstate/src/catalog/validate-binding.ts:22

Validate component binding against catalog

Per CONTEXT.md:

  • “Component references: String keys”
  • “Mismatch detection: Both compile-time (TypeScript) and runtime validation”

Parameters

ParameterTypeDescription
viewViewMetadataView metadata from meta.view
catalogCatalogComponent catalog

Returns

void

Example

const view = { component: "Dashboard", userId: "123" };
validateComponentBinding(view, catalog);
// Throws if 'Dashboard' not in catalog

Throws

Error if component not found in catalog