Return type of an inherited static method returning "new this()" is incorrectly the base class, but it's the child class in runtime #11793
Labels
Suggestion
An idea for TypeScript
Too Complex
An issue which adding support for may be too complex for the value it adds
TypeScript Version: 2.0.3
Code
Expected behavior:
The compiler correctly infers the type of
shouldBeB
as B.Actual behavior:
The compiler infers the type of
shouldBeB
as A, but it's B in runtime.The text was updated successfully, but these errors were encountered: