ReturnType
Like the builtin helper but more convenient to use.
Last updated
Was this helpful?
Like the builtin helper but more convenient to use.
Last updated
Was this helpful?
There is two major pain point with :
If you have a function like:
And you are trying to extract Shape
, when you use the default return type:
With tsafe
's ReturnType
undefined
Let's say we have an interface defined as such:
And we want to extract the type Shape
, using the default ReturnType
we have to do:
With the ReturnType of tsafe
you don't need NonNullable