-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Item 41: Understand Evolving any #8
Comments
Comment by disqus_0l6QhEp9JS on 2020-11-28 03:11: "A final case that triggers this "evolving any" behavior is if a variable is initially null. This often comes up when you set a value in a try/catch block:" This seems out of place - it's in the middle of a different case - and it's obviously missing at least an example piece of code, if not more... "This behavior can be confusing to follow in your editor since the type is only "evolved" after you assign or push an element. Inspecting the type on the line with the assignment will still show any or any[]." Shouldn't this paragraph be somewhere else as well? Asking because I'm interested in the missing example :) |
Comment by danvdk on 2020-11-28 10:02: Gah, should be fixed now, thanks for the heads up. (This broke along with a few other things as a result of incorporating literate-ts into the blog.) |
Comment by disqus_0l6QhEp9JS on 2020-11-29 07:02: No problem! Looking forward to reading the book now :) |
Item 41: Understand Evolving any
https://effectivetypescript.com/2020/03/09/evolving-any/
The text was updated successfully, but these errors were encountered: