How to define first element as type First and extract result of previous element as parameters of next function.
type First = (a: number) => any;
const fns = [
(a) => a.toString(), // a => number;
(b) => parseInt(b), // b => string
(c) => c + 1, // c => number
(d) => d.toString() // d: number
]
I need a, b, c, d, ...etc have to be defined.