Problem Statement
infer is used to…
Explanation
“infer” lets you pull out a type part from the left side of a conditional. Think: pattern-match a type and bind the inner piece.
Code Solution
SolutionRead Only
type UnwrapPromise<T> = T extends Promise<infer U> ? U : T; type X = UnwrapPromise<Promise<number>>; // number
