This PR simplifies specifying type of the resolved value from the show function. Currently, if you want to provide a precise type of the value resolved from a promise, you'll need to provide 1/2 additional types – depending on whether you use an ID or a modal reference.
Both ComponentType and PropsType can be automatically inferred by TS, so having to type them all each time you want to provide TypeOfTheValue is a bit inconvenient.
This PR simplifies specifying type of the resolved value from the
show
function. Currently, if you want to provide a precise type of the value resolved from a promise, you'll need to provide 1/2 additional types – depending on whether you use an ID or a modal reference.Before:
Both
ComponentType
andPropsType
can be automatically inferred by TS, so having to type them all each time you want to provideTypeOfTheValue
is a bit inconvenient.After:
Now you can provide just the first type while the rest gets inferred. Let me know what you think.