MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / generateWidgetKey

Function generateWidgetKey

packages/core/src/widgets/composition.ts:236–239  ·  view source on GitHub ↗

* Generate a unique widget key for a definition. * This ensures each call to defineWidget creates a distinct widget type.

(name?: string)

Source from the content-addressed store, hash-verified

234 * This ensures each call to defineWidget creates a distinct widget type.
235 */
236function generateWidgetKey(name?: string): string {
237 const id = widgetKeyCounter++;
238 return name ? `${name}_${id}` : `Widget_${id}`;
239}
240
241/**
242 * Props constraint: must have optional key property.

Callers 1

defineWidgetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected