Compile the following using noImplicitAny:
functionfoo<T>(x: T): T{returnx}interfaceI{x: string;}vari: I=foo({x: null});// Errorvars: string=f(null);// No errorNeither of these should be errors. According to the spec, both of these should widen, but in #531Daniel Rosenwasser (@DanielRosenwasser) and I explain why these should not widen.
The noImplicitAny error resulting from widening is a breaking change from 1.0, and it broke a customer.
Compile the following using noImplicitAny:
Neither of these should be errors. According to the spec, both of these should widen, but in #531Daniel Rosenwasser (@DanielRosenwasser) and I explain why these should not widen.
The noImplicitAny error resulting from widening is a breaking change from 1.0, and it broke a customer.