• Courses
  • Tutorials
  • Practice
Switch to Dark Mode

TypeScript | Generics in TypeScript | Question3

Last Updated : Mar 22, 2025
Discuss
Comments

What is the output type of the following generic function?

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


A

T

B

{ value: T }

C

void

D

unknown

Share your thoughts in the comments