TypeScript | Generics in TypeScript | Question3

Last Updated :
Discuss
Comments

What is the output type of the following generic function?

JavaScript
function wrap<T>(value: T): { value: T } {
    return { value };
}


T

{ value: T }

void

unknown

Share your thoughts in the comments