← All Exercises
Generic Curried Function Types
advancedtypescript
Background
Typed currying is challenging because each partial application step has a different type, requiring advanced generic patterns.
Problem
Write a typed curry function that takes a multi-argument function and returns a curried version with correct types at each application step.
Input
A function with multiple typed parameters.
Output
A curried function with type-safe partial application at each step.
Sample tests
Sample 1
Input: curry((a:number,b:string)=>a+b.length)(5)("hi")Expected: 7
Your solution
Learning objective
Master advanced generics for type-safe function transformation patterns.