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
the type of whatIsMyType is string (I would expect string | undefined). This means I can write a method that pulls from the map and claims to return a string without any warning:
Apologies if this has been covered before an/or is not a bug but I can't seem to find it in the issue list or any discussion of it online.
TypeScript Version: 2.0.3
Given this code:
the type of
whatIsMyType
isstring
(I would expectstring | undefined
). This means I can write a method that pulls from the map and claims to return astring
without any warning:Shouldn't
| undefined
be added implicitly to the type returned from a map like this?The text was updated successfully, but these errors were encountered: