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
Expected behavior:
This works exactly as expected, such that there's an error on the second assignment to num3.
I don't easily see something in your doc that mentions this is possible. It is probably implicit in various places, as it is particularly useful with some unions. Seems like calling this out explicitly would be valuable?
The text was updated successfully, but these errors were encountered:
Some relevant readings meanwhile, literal types are widened to their base type in mutable locations (see #10676), and explicit literal type annotations are not widened (see #11126)
Another relevant change is that our section on specialized signatures needs to be simplified. As far as I remember, specialized signatures are only re-sorted now.
Code
Try the following out at https://www.typescriptlang.org/play/index.html (sadly, this is too long to include a sharable link)
Expected behavior:
This works exactly as expected, such that there's an error on the second assignment to num3.
I don't easily see something in your doc that mentions this is possible. It is probably implicit in various places, as it is particularly useful with some unions. Seems like calling this out explicitly would be valuable?
The text was updated successfully, but these errors were encountered: