Intersection type from Function
and object literal type doesn't work
#22877
Labels
Design Limitation
Constraints of the existing architecture prevent this from being fixed
TypeScript Version: 2.7.2
Search Terms: Function interface, object literal type, intersection, type alias
Code
or equivalent:
doesn't even depend on the order
Expected behavior:
The function call
bar.prototype.foo()
should throw a compile time error, asfoo
is marked as a number.Actual behavior:
The property
bar.prototype
is of typeany
, no matter the intersection type.Playground Link: here
Related Issues: #17757
The text was updated successfully, but these errors were encountered: