[@sapui5/types@1.115] Type signatures broken for sap.ui.define
Closed this issue · 6 comments
Starting with version 1.115, the type signatures for sap.ui.define
seem to be broken and type errors are raised:
No overload matches this call.
Steps to reproduce:
- Clone https://github.com/SAP-samples/ui5-cap-event-app.git
- Checkout
js-with-typescript-support
npm i -D @sapui5/types@1.115.1
- Open
Registration.controller.js
and observe ts errors
Confirmed. Triggered by this commit and probably caused by a bug in the JSDoc parser or type generator which changes the rest parameter syntax to one single parameter.
Before the change, the type definition said Function
, now it says (p1: any) => any
but it should say (...p1: any) => any
.
Thanks!
Should be fixed for 1.116.
Looking into a 115 downport.
That last commit was the downport, so 1.115.2 also gets the fix.
@codeworrior something to discuss - somehow this fix doesn't seem to be in "still"... 🤔
Somehow the change hasn't been merged into the master branch and thus was missing in 1.117.0. The fix will come with 1.118 and there is a planned patch for 1.117 in October. The @types/openui5
from Definitely Typed have been fixed manually.