<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.3 **Code** ```ts const evenSquares: number[] = [1, 2, 3, 4] .map(x => x % 2 === 0 ? x * x : null) .filter(x => !!x); ``` with `strictNullChecks` enabled. **Expected behavior:** This should type check. The type of `evenSquares` should be `number[]`. **Actual behavior:** The type of `evenSquares` is deduced as `(number|null)[]`, despite the null values being removed via the call to `.filter`.