I spent quite some time trying to find how to type the the response of the show and couldn't manage that.
I tried to add the type directly to the response, as shown in the attached image.
I tried to set it inside the modal: modal.resolve({ msg: "here" } as ConfirmationDialogResponse)
Nothing seemed to make it.
With this PR, we are adding an optional ResolveType for the useModal hook, which will pass the type to the Promise resolution of the show method. Otherwise, it will default to unknown as before.
I spent quite some time trying to find how to type the the response of the show and couldn't manage that.
modal.resolve({ msg: "here" } as ConfirmationDialogResponse)
Nothing seemed to make it.
With this PR, we are adding an optional
ResolveType
for theuseModal
hook, which will pass the type to the Promise resolution of theshow
method. Otherwise, it will default to unknown as before.