Closed JuanjoPP closed 1 month ago
This is an incompatible change of the TypeScript definitions and was introduced in 1.115.0. The change and how to deal with it, is explained in more detail in the UI5 TypeScript release notes for 1.115.
Basically, enums attached to other control or utility APIs are no longer named exports (Dock
) but static properties of the default export of the bearing API (Popup.Dock
).
The change was done to make static and dynamic imports consistent.
Hi,
I tried the change proposed and changed the import:
Unfortunately the error still appears.
You're right, the generation of the MessageToast.show
API is broken. I've created https://github.com/SAP/ui5-typescript/issues/466 as this needs to be fixed in the dts-generator.
The only workaround for now is a type cast (which unfortunately needs to be removed once the issue has been fixed):
at: Popup.Dock.BeginBottom as unknown as typeof Popup.Dock
As this is not an issue in the OpenUI5 code base, I'm closing this issue here.
OpenUI5 version: 1.126.0
Browser/version (+device/version): not applicable
Steps to reproduce the problem:
What is the expected result? The TypeScript checker does not throw an error
What happens instead? It throws an error
Any other information?