At the moment if I have to provide type of modal props (while calling NiceModal.show()), then I do something like the below -
It would be nice if I wouldn't have to declare a separate variable - just so that TS helps me to provide correct props to the modal (when this can be done without declaring the variable). Implementing this suggestions would help in readability and save a LOC and variable. One suggestion from me is something like this -
Right now, trying to do the above, provides the 'DeleteModalProps' type to the returned promise's value (not to the props of modal).
At the moment if I have to provide type of modal props (while calling NiceModal.show()), then I do something like the below -
It would be nice if I wouldn't have to declare a separate variable - just so that TS helps me to provide correct props to the modal (when this can be done without declaring the variable). Implementing this suggestions would help in readability and save a LOC and variable. One suggestion from me is something like this -
Right now, trying to do the above, provides the 'DeleteModalProps' type to the returned promise's value (not to the props of modal).