Is there a way to enforce a specific type of function with default values for some functions?
I experimented with a simple code snippet like the one below:
type MyFunc = (str: string) => number;
const myAFunc: MyFunc = (str) => Number(str);
const myBFunc: MyFunc = (str = '9999') => Number(str);
myAFunc('a');
myAFunc(); // should result in an error
myBFunc('b');
myBFunc(); // should not result in an error
However, it doesn't seem to be working. Are there any solutions available?