Explore Library
QuizAdvanced

Generics with Optional Parameters

Understand how a generic type parameter infers when combined with an optional function argument.

Given `function wrap<T>(value?: T): T[] { return value === undefined ? [] : [value]; }`, what is the inferred type of `wrap('hi')`?