Skip to content

API Reference / @gtkx/config / index / ElementConfigOptions

Type Alias: ElementConfigOptions ​

ElementConfigOptions = object

Defined in: packages/config/src/config.ts:34

Overrides for one GLib type in elements.config, keyed by its registered type name.

Type Declaration ​

acceptedChildTypes? ​

optional acceptedChildTypes?: string[]

Accepted child GLib type names to show in the generated element documentation.

component? ​

optional component?: object

Component export that wraps the generated element.

component.export ​

export: string

Name of the export to import from the module.

component.module ​

module: string

Module specifier containing the named export.

isLazy? ​

optional isLazy?: boolean

Whether the parent container creates this element's GObject instead of the element constructing its own.

omittedProps? ​

optional omittedProps?: string[]

GObject properties to leave out of generated props, such as properties managed by an element behavior.

props? ​

optional props?: object

Additional props type to combine with the generated element props.

props.composition? ​

optional composition?: "intersection" | "factory"

How the exported props are combined: intersection is inherited; factory applies only to this type. Defaults to intersection.

props.constructOnly? ​

optional constructOnly?: string[]

Props that can only be set when the element is created; changing them afterward throws.

props.export ​

export: string

Name of the export to import from the module.

props.module ​

module: string

Module specifier containing the named export.