SAP / ui5-typescript

Tooling to enable TypeScript support in SAPUI5/OpenUI5 projects
https://sap.github.io/ui5-typescript
Apache License 2.0
202 stars 28 forks source link

fix(ts-interface-generator): no error when parent class has no c'tor #474

Closed akudev closed 2 months ago

akudev commented 2 months ago

This in particular addresses the common case when Component.js inherits from the sap/fe/core/AppComponent, which has no constructor.

This used to cause the error 'Component inherits from ManagedObject and has metadata but the parent class "sap/fe/core/AppComponent".AppComponent seems to have no settings type. It might have no constructors, this is where the settings type is used. Or the settings type used there and its inheritance chain could not be resolved.'

Actually, AppComponent does have a settings type, but it is not found without constructor and it is never used and unneeded, because it inherits from the UIComponent settings type without adding anything, like this: export interface $AppComponentSettings extends $UIComponentSettings {}