3 ms·
First of all: That is both the function definition and implementation on the same row! Make line breaks around the curly braces. Secondly, the (...args: TS) =>
by Too 8y ago
First of all: That is both the function definition and implementation on the same row! Make line breaks around the curly braces.
Secondly, the (...args: TS) => R can be extracted into another type/interface, this way you would just get "function call<TS extends any[], R>(fn: Callable<TS, R>, ...args: TS): R"