Description
Hello Experts,
I am encountering an issue with SAPUI5 version 1.120.12 when trying to create a Singleton instance of sap.ushell.Container to get a Navigation Service for navigating to another SAPUI5 application using a semantic object and action.
Problem
The intended method call, as per the API documentation, should be:
sap.ushell.Container.getServiceAsync("Navigation")
However, the linter reports an error, and even the API documentation's recommended approach does not work in TypeScript.
Code Snippet:
sap.ushell.Container.getServiceAsync("Navigation").then(function (navigation) {
navigation.toExternal({
target: {
semanticObject: "SemanticObject",
action: "action"
}
});
});
Linter Error
Additional Information
The issue might be related to an incorrect type definition file, as the method call provided in the API documentation also fails in TypeScript.
How should this method be correctly invoked in TypeScript to avoid the linting error? Could the type definition file for this version be incorrect?
Thank you for your assistance.
Best regards,
Dominik Kastenmeier