Closed
Description
TypeScript Version:
nightly (1.9.0-dev.20160623-1.0)
Code
let foo = [];
foo.push('x');
Expected behavior:
No errors, TypeScript should infer the type any[]
for the variable foo
.
Actual behavior:
tsc without any command line option behaves as expected, but when used with --strictNullChecks
it emits the error:
foo.ts(2,10): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.