Skip to content

API Reference / @gtkx/runtime / installInterfaces

Function: installInterfaces() ​

installInterfaces(cls, interfaces): void

Defined in: packages/runtime/dist/registry.d.ts:172

Copies the members of registered interfaces onto a wrapper class, resolving each interface's mixin through the registry rather than taking the mixin itself, so a class states which interfaces it implements by referencing their classes. The interfaces must already be registered through registerInterface; generated code guarantees that by declaring interfaces ahead of the classes that implement them.

Parameters ​

cls ​

AnyClass

Wrapper class adopting the interfaces.

interfaces ​

AnyClass[]

Registered interface classes to adopt, in order.

Returns ​

void

Throws ​

If an entry is not a registered interface.