Closed iljapostnovs closed 2 years ago
Seems to make sense, thanks!
Not everything is as it seems. Accessors are only generated for sub-classes of ManagedObject. An EventProvider does not get any attach*/detach*/fire*
methods generated for its events. Hence there is also no need to create an interface with such methods.
The generation is triggered in ManagedObjectMetadata. You can see the difference at https://jsbin.com/topizem/1/edit?html,output
But still there is something wrong: the interface generator should not even try to handle this file. In fact I had wrongly added "EventProvider" as one of the "interesting" base classes for which interfaces need to be generated. Fix is coming. Thanks!
Didn't expect that EventProvider would not generate event related methods, but fair enough. Now it works fine, thanks a lot!
@iljapostnovs valid point reg. EventProvider
and the generation of event related methods. However, I didn't find enough benefit in changing this, see https://github.com/SAP/openui5/issues/3084#issuecomment-992187635 .
@ui5/ts-interface-generator: 0.5.1 There are issues with classes which doesn't have settings type.
Generator fails on this and doesn't continue to generate the rest of the interfaces. Example: extending of WebSocket (https://ui5.sap.com/#/api/sap.ui.core.ws.WebSocket) Would it be possible to generate interfaces without settings type of the parent? I see that the second interface in .gen.d.ts file could be generated without parent. (which adds
fire<Event>
,detach<Event>
,attach<Event>
etc) If no, at least some configuration with file exclusions would be nice as well.Thanks!