API Reference / @gtkx/react / config / defineElements
Variable: defineElements
constdefineElements: (elements) =>Record<string,ElementConfig<never>>
Defined in: reconciler/registry.d.ts:106
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>>