🐞 Issue Description
Since version 1.138 (DefinitelyTyped PR #73225
), the sap.m interface Menu$ItemSelectedEventParameters defines the property item with the type IMenuItem.
Before this PR, the property had the type sap.m.MenuItem.
As a result, when accessing the "item" event parameter in a handler, previous method calls (e.g., getBindingContext) no longer work.
💥 Example
public onDateEndCalculateMenuButtonItemSelected(event: Menu$ItemSelectedEvent): void {
const bindingContext = event.getParameter("item")?.getBindingContext("dialog");
}
TypeScript output:
error TS2339: Property 'getBindingContext' does not exist on type 'IMenuItem'.
📋 Details
This issue occurs everywhere the IMenuItem interface is used instead of sap.m.MenuItem.
The IMenuItem interface currently only contains one property:
__implements__sap_m_IMenuItem
💡 Expected Behavior
The item event parameter should provide access to the same methods as before (e.g., getBindingContext), or IMenuItem should properly reflect the type definition of sap.m.MenuItem.
✅ Environment
Type Definitions: since @types/openui5 version 1.138
UI5 Library: sap.m
TypeScript: 5.9.2
🐞 Issue Description
Since version 1.138 (DefinitelyTyped PR #73225
), the sap.m interface Menu$ItemSelectedEventParameters defines the property item with the type IMenuItem.
Before this PR, the property had the type sap.m.MenuItem.
As a result, when accessing the "item" event parameter in a handler, previous method calls (e.g., getBindingContext) no longer work.
💥 Example
TypeScript output:
error TS2339: Property 'getBindingContext' does not exist on type 'IMenuItem'.📋 Details
This issue occurs everywhere the IMenuItem interface is used instead of sap.m.MenuItem.
The IMenuItem interface currently only contains one property:
__implements__sap_m_IMenuItem💡 Expected Behavior
The item event parameter should provide access to the same methods as before (e.g., getBindingContext), or IMenuItem should properly reflect the type definition of sap.m.MenuItem.
✅ Environment
Type Definitions: since @types/openui5 version 1.138
UI5 Library: sap.m
TypeScript: 5.9.2