SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

TypeScript / API Doc: Missing parameter for the `new sap.ui.test.Opa5()` constructor #4092

Closed PierreFritsch closed 1 month ago

PierreFritsch commented 1 month ago

OpenUI5 version

"@sapui5/types": "1.126.0"

URL (minimal example if possible):

Steps to reproduce the problem:

The OPA5 documentation provides the code sample:

// "Opa5" required from "sap/ui/test/Opa5"
var arrangements = new Opa5({
    iStartMyApp : function () {
        return this.iStartMyAppInAFrame("../index.html");
    }
});

What happens?

When I use "@sapui5/types": "1.126.0" and I attempt to type the code above, then my IDE shows the error:

Expected 0 arguments, but got 1.ts(2554)

The documentation also indicates that the sap.ui.test.Opa5 constructor accepts no parameter:

Constructor

new sap.ui.test.Opa5()

What is the expected result?

I would expect that, when I use SAPUI5 from a TypeScript app with the latest version of @sapui5/types, I can use the code samples from the documentation without encountering a type error.

tsanislavgatev commented 1 month ago

Hello @PierreFritsch , Thank you for sharing this finding. I've created an internal incident DINC0215174. The status of the issue will be updated here in GitHub. Regards,

plamenivanov91 commented 1 month ago

Hello @PierreFritsch ,

Thanks for the reported issue.

The issue has been fixed and it will be present in the upcoming OpenUI5 1.128 version.

Linking commit for reference: https://github.com/SAP/openui5/commit/04508a03a7fa09590059841a8d91a3b8330b99ad

Regards, Plamen Ivanov