SirHaus
TTCTheo's Typesafe Cult
•Created by SirHaus on 5/10/2023 in #questions
Typescript function parameter into returnType
Here's my function:
It returns as below
I want to use the function in the below syntax:
and not
🤨 How can I create the type
Name
- from the value of the parameter name
- and use it in the returnType
thing so I avoid typing 'test'
twice in the call?3 replies