Skip to content

API Reference / @gtkx/react / config / defineElements

Variable: defineElements ​

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

Defined in: reconciler/registry.d.ts:108

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>>

Released under the MPL-2.0 License.