Thanks for the great article Jaime,
One thing I would like to add is: never
never
Lets say we have a function that can return data or throw Error Then function type would be () => Data | never
() => Data | never
Doc's are little unclear about it but here are some of the use cases stackoverflow.com/questions/422918...
Thank you Saurabh! You are right! I kind of completely forgot writing about void and never. Thank you for your comment!
void
They are usually not that much used tho
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the great article Jaime,
One thing I would like to add is:
never
Lets say we have a function that can return data or throw Error
Then function type would be
() => Data | never
Doc's are little unclear about it but here are some of the use cases stackoverflow.com/questions/422918...
Thank you Saurabh! You are right! I kind of completely forgot writing about
void
andnever
. Thank you for your comment!They are usually not that much used tho