Skip to content

API Reference / @gtkx/runtime / registerClass

Function: registerClass()

registerClass<T>(klass, options?): T

Defined in: runtime/dist/register-class.d.ts:15

Registers a subclass of a wrapper class as a new GType, wiring up any class and inherited-interface virtual functions it overrides. Throws if the class does not extend a registered wrapper class, has no derivable type name, or overrides an unsupported construct-time vtable slot.

Type Parameters

T

T extends AnyClass

Parameters

klass

T

The subclass to register.

options?

RegisterClassOptions

Registration options, such as an explicit type name.

Returns

T

The same class, now registered.

Released under the MPL-2.0 License.