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
It returns as below
I want to use the function in the below syntax:
and not
Name - from the value of the parameter
- and use it in thenamereturnTypething so I avoid typing'test'twice in the call?