-
Notifications
You must be signed in to change notification settings - Fork 27
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
Type issue with 1.115
upgrade
#416
Comments
Does action: keyof typeof MessageBox.Action in the second line work for you to have at least some simplification? (Plus, of course there is the possibility to say Still not perfect, I know. We'll check. |
Thanks for the hint, I've missed that one! It works and not having to type 2 sets of brackets is a big win. |
Hey @akudev, I noticed another thing I wanted to ask about. Tell me if I it does not belong here - It's not directly related to this issue. During development, I've noticed the This forces type casting when retrieving the "parameters" of the event - in this case the |
Hello everyone, I just upgraded to this package and I'm having the same issue to import the Action enum from the MessageBox. I know that in older packages of the type declarations the enums were exported with the controls, is there a reason why this was changed for this package? |
True, but it's defined by jQuery, not by us. We could probably extend it, but yeah, not really investing into jQuery anymore. Plus, I wonder how you got to use We still could make it generic, but Again, |
@gssales It was done because this fits the UI5 runtime. Previously, dynamic imports like |
Following type upgrade, now code has to look like this:
let a = MessageBox.Action.ABORT;
However when having to type out an argument of a callback function with the possible
Action
s, I find myself having to do this:which is quite cumbersome. The natural approach of typing
action
asMessageBox.Action
does not seem to work, I getAm I missing something?
Many thanks
The text was updated successfully, but these errors were encountered: