I have the following function:
export function output(functions: Function[], inputs: unknown[]) {
for (let func of functions) {
console.log(`=== ${func.name} ===`);
for (let input of inputs) {
console.log(`"${input}"\t-> ${func(input)}`);
}
console.log();
}
}
It works fine. However the tsc compiler complains on this line:
console.log(`=== ${func.name} ===`);
Saying:
Error TS2339: Property 'name' does not exist on type 'Function'.
What is causing the issue?