Below is what I tried and it is working okay but I want to utilize Infer
in typescript
to make this function return specific value:
function one() {
return "one";
}
function one() : 'one' {
return "one";
}
New contributor
codeBox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.