API Reference / @gtkx/runtime / Interface
Type Alias: Interface<TImpl>
Interface<
TImpl> =AnyClass&object
Defined in: packages/runtime/dist/register-class.d.ts:13
A generated interface value, such as Gio.ListModel, in the form registerClass takes it. __impl__ exists only in the type system: it carries the interface's Impl type, of which a class has to match every member it declares itself, which rejects a class value and a member whose signature does not fit the slot it fills. Leaving a slot to the interface is not rejected, because registerClass does not reject it either: every member of an Impl type is optional, and the Partial holds that open whatever the type declares. The object beside it keeps TypeScript from also demanding one member in common. An interface that introspection describes no vtable for carries unknown, since it has no slot a class could fill.
Type Declaration
__impl__
__impl__: (
impl) =>void
Type-level slot holding the interface's Impl type; no value ever carries it.
Parameters
impl
Partial<TImpl> & object
Returns
void
Type Parameters
TImpl
TImpl