Given
interfaceFooType{x: number;}functionFoo(this: FooType,x: number){this.x=x;}letfoo/**/=newFoo(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.
Given
Expected:
fooshould be of typeFooTypeActual:
foois of typeany.Note: If you name the interface and the function the same thing, then the type of
foois structurally correct.