Skip to content

API Reference / @gtkx/react / config / defineElements

Function: defineElements() ​

defineElements(elements): Record<string, ElementConfig<never>>

Defined in: packages/react/src/reconciler/registry.ts:134

Identity helper that types the module named by elements.behaviors in gtkx.config.ts, enabling editor autocompletion and type checking. Key each entry by GLib type name and write each behavior with defineBehavior so its hooks receive the concrete GObject class.

Parameters ​

elements ​

Record<string, ElementConfig<never>>

Returns ​

Record<string, ElementConfig<never>>