TypeScript Version 3.5.1
I've encountered an issue with TypeScript where the compiler fails to flag missing arguments in function declarations. Here's a basic illustration of the problem.
interface IArgs {
foo: number;
}
type MyFunc = (args: IArgs) => Promise<any>;
// No complaint from TypeScript about missing arguments here
const fn: MyFunc = async() => { };
/*
Uncommenting the line below will make the TypeScript compiler complain,
but it should have caught the issue in the previous declaration.
*/
// fn();
How can I prompt the TypeScript compiler to detect and alert me about missing arguments in function definitions?