You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeMovie={title: string;yearReleased: number;}constm={title: "The Matrix",yearReleased: 1999};constx: Movie={ ...m,title: undefined};
Expected behavior:
When strictNullChecks = true it should not allow for title = undefined Actual behavior:
It does not raise an error and I can have an object with a required property undefined.
It does work if I try to set null to title, the compiler will raise an error
The text was updated successfully, but these errors were encountered:
With strictNullChecks, this should complain about x being possibly null at the spread location (in ES6 or with downlevelIteration this also gives a TypeError).
With strictNullChecks, this should complain about x being possibly null at the spread location (in ES6 or with downlevelIteration this also gives a TypeError).
TypeScript Version: 2.2.1
Code
Expected behavior:
When strictNullChecks = true it should not allow for title = undefined
Actual behavior:
It does not raise an error and I can have an object with a required property undefined.
It does work if I try to set null to title, the compiler will raise an error
The text was updated successfully, but these errors were encountered: