Closed
Description
Given
interface FooType {
x: number;
}
function Foo(this: FooType, x: number) {
this.x = x;
}
let foo/**/ = new Foo(12);
Expected:
foo
should be of type FooType
Actual:
foo
is of type any
.
Note: If you name the interface and the function the same thing, then the type of foo
is structurally correct.