paint-brush
Get the Return Type of a Function in Typescript Using ReturnTypeby@smpnjn
1,091 reads
1,091 reads

Get the Return Type of a Function in Typescript Using ReturnType

by Johnny Simpson2mMay 15th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The ReturnType utility type is very useful in situations where the output of a specific function needs to be taken in by another function. In that scenario, you might create a new, custom type, that the output of a function constrains itself to.
featured image - Get the Return Type of a Function in Typescript Using ReturnType
Johnny Simpson HackerNoon profile picture
Johnny Simpson

Johnny Simpson

@smpnjn

Product, Engineering, Web

About @smpnjn
LEARN MORE ABOUT @SMPNJN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Johnny Simpson HackerNoon profile picture
Johnny Simpson@smpnjn
Product, Engineering, Web

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite