Advanced TypeScript
Q94 / 100

What is the purpose of "Function" overload combined with generic inference for a curried function, e.g. "function curry<A, B, C>(fn: (a: A, b: B) => C): (a: A) => (b: B) => C"?

Correct! Well done.

Incorrect.

The correct answer is B) It transforms a two-argument function type into a chain of single-argument functions while preserving full type information for all three type parameters

B

Correct Answer

It transforms a two-argument function type into a chain of single-argument functions while preserving full type information for all three type parameters

Explanation

Generic higher-order function types like this preserve the relationships between argument and return types across the curried chain, so each returned function remains fully typed.

Progress
94/100