Closed AnsgarLichter closed 2 months ago
Hi @AnsgarLichter, I think you are right about removeXY - thanks for spotting this!
But for insertXY, "this" is indeed returned, no? You can see this e.g. for the "content" of a Panel: https://jsbin.com/hibahuk/1/edit?html,output Also in your screenshot, "insertColumn" returns something with ID "_control0", which is the parent control (this), not the inserted one.
Hi @akudev,
Yes you are right about insertXY, I oversaw this. Thanks for double-checking.
BR Ansgar
Fixed in 0.8.4 - thanks again.
Describe the bug I was just having a look into OpenUI5 with TypeScript for a private project. I played around with custom controls. I defined a custom aggreagation with
multiple: true
:This leads to the following generated interface:
Nevertheless during runtime the method
insertColumn
and`removeColumn
return the inserted or removed element:Expected behavior The interface generator should generate the return type according to runtime behaviour:
I checked with other aggregations with the cardinality
0 .. n
. They have all the return typeType of Aggregation |null
(seesap.ui.table.Table
orsap.m.Page
).Additional context I used version
0.8.3
of the module@ui5/ts-interface-generator
and the following OpenUI5 version: