Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@sapui5/ts-types-esm - CrossApplicationNavigation.hrefForExternal should be an overload that can return a Promise<string> #317

Open
DetachHead opened this issue Nov 30, 2021 · 1 comment
Labels
types ES modules types (recommended) wontfix This will not be worked on

Comments

@DetachHead
Copy link

i'm not sure if this is something that can be fixed in the docs at https://github.com/SAP/openui5, but according to the docs regarding the bAsync parameter:

if set to true, a promise will be returned instead of the direct argument.

so the overload should be something like:

    hrefForExternal(oArgs: object, bAsync: true): Promise<string>;
    hrefForExternal(oArgs: object, bAsync: false): string;
@codeworrior codeworrior added the wontfix This will not be worked on label Nov 30, 2021
@codeworrior
Copy link
Member

This is currently not possible with the generation approach. The relationship between return type and parameters is only described in text, not in a formal, machine readable way.

What can be fixed, is the return type of hrefForExternal. It should mention the Promise variant, too. I'll forward again (sap.ushell is also not part of OpenUI5, only SAPUI5).

@petermuessig petermuessig added the types ES modules types (recommended) label Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types ES modules types (recommended) wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants