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
TSC (3.8.3 and earlier) in strict mode accepts the undefined value whereas it leads to foo not being of type Foo. Nodejs copies all entries found in bar, including the ones with an undefined value.
TypeScript Version: 3.8.2
Search Terms:
Code
Expected behavior:
Type check fails
Actual behavior:
No Typecheck error.
It is interesting that if we remove explicit
string
type forkey
the code is not compilable as expected.Playground Link:
https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=4&pc=1#code/MYewdgzgLgBARjAvDA3jAhgLhgcgBYCmANkSDjAL4DcAsAFCiSwDWBAnttAE4CWYA5klyESZWg3DQM2AEoFQXACYAebn34AaGGoEA+IWgB0xuFoDarNgF1sAVzCKCAMz4FFlcUA
The text was updated successfully, but these errors were encountered: