You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Since UI5 1.115.0, the TS types use a different strategy for enums attached to another API. They are no longer named exports, but attached as static properties.
When such an enum (e.g. Dock), exported as static property of a class (e.g. Popup.Dock), is used in the signature of yet another class (e.g. MessageToast), then the signature of that other class is broken. For a detailed example see SAP/openui5#4091.
Expected behavior
Any usage of such an enum in another API should work seamlessly.
Additional context
The problem is that the "usage in yet another class" currently uses the static property to refer to the type:
Unfortunately, this is not the same as the original enum. According to my experiments, it would be better to
importtype{Dock}from"sap/ui/core/Popup";// ideally, import as typeinterfaceMessageToast{show(msg: string,at: Dock// <-- better declaration of type)
...
Interestingly, this works already today as the enum Dock is exported from Popup (any declaration in an ambient module declaration is implicitly an export, even without the keyword export).
The text was updated successfully, but these errors were encountered:
Describe the bug
Since UI5 1.115.0, the TS types use a different strategy for enums attached to another API. They are no longer named exports, but attached as static properties.
When such an enum (e.g.
Dock
), exported as static property of a class (e.g.Popup.Dock
), is used in the signature of yet another class (e.g.MessageToast
), then the signature of that other class is broken. For a detailed example see SAP/openui5#4091.Expected behavior
Any usage of such an enum in another API should work seamlessly.
Additional context
The problem is that the "usage in yet another class" currently uses the static property to refer to the type:
Unfortunately, this is not the same as the original enum. According to my experiments, it would be better to
Interestingly, this works already today as the enum
Dock
is exported fromPopup
(any declaration in an ambient module declaration is implicitly an export, even without the keywordexport
).The text was updated successfully, but these errors were encountered: