Allow "create" to specify additional interfaces #818
Labels
effort/large
Large work item – several weeks of effort
feature-request
A feature should be added or improved.
module/kernel
Issues affecting the `jsii-kernel` module
The kernel's
create
(and the privateobjects.register
) call only requires the caller to specify a singlefqn
(that of the base type, which can beObject
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 asany
, 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.The text was updated successfully, but these errors were encountered: