3 ms·
Typescript has its own issues: interface IA { } interface IB { foo(): void; } function fn(passedFn: (a: IA) => void) { passedFn({}); } //
by spion 13y ago
Typescript has its own issues:
interface IA { }
interface IB { foo(): void; }
function fn(passedFn: (a: IA) => void) {
passedFn({});
}
// compiles but throws TypeError at runtime!
fn((b: IB) => b.foo());