-
Notifications
You must be signed in to change notification settings - Fork 262
Description
The kernel's create (and the private objects.register) call only requires the caller to specify a single fqn (that of the base type, which can be Object if nothing better is available). Unfortunately, this means that instances that implement one or more interface not inherited from a Javascript base class, the type information for interface members is lost when crossing the language boundary. This in turns causes all method arguments and return types to be inferred as any, further preventing type information from being available. This has been found to cause issues such as #807.
In order to address this, the kernel needs to allow the caller to also specify a list of implemented interfaces, so that it is able to access type information for members that are override in the foreign language. This is also useful when a client sub-classes a jsii type and adds new interface implementations to it, since that allows the type information for those to become available, too.