// test.ts
interface A {
a: string;
}
interface B extends A {
b: string;
}
const a = (a: B) => a.b;
const b = (a: (a: A) => string) => a({a: "param a"});
console.log(b(a));
This is valid typescript code.
But, of course:
$ tsc test.ts
$ node test.js
undefined
$
Is this bug?
Or my misunderstanding?