function add(a = 0, b = 0, c = 0, d = 0, e = 0) {
return a + b + c + d + e;
}
const add0 = add.bind(null);
// const add0: (a?: number, b?: number, c?: number, d?: number, e?: number) => number
const add1 = add.bind(null, 1);
// const add1: (b?: number | undefined, c?: number | undefined, d?: number | undefined, e?: number | undefined) => number
const add2 = add.bind(null, 1, 2);
// const add2: (c?: number | undefined, d?: number | undefined, e?: number | undefined) => number
const add3 = add.bind(null, 1, 2, 3);
// const add3: (d?: number | undefined, e?: number | undefined, e?: number | undefined) => number
const add4 = add.bind(null, 1, 2, 3, 4);
// const add4: (e?: number | undefined) => number
const add5 = add.bind(null, 1, 2, 3, 4, 5);
// const add5: (...args: (1 | 2 | 3 | 4 | 5)[]) => number