Twitter | Search | |
swyx ๐Ÿฆ†
Over the weekend I finished 's excellent book on Programming in one sitting. () ๐ŸถI dogeared every page on which I learned something I might go back to; here is a brief thread with some of the cool things I learned ๐Ÿ‘‡๐Ÿผ
Reply Retweet Like More
swyx ๐Ÿฆ† 3 Jun 19
Replying to @swyx
๐Ÿ’๐Ÿผโ€โ™‚๏ธA union of object types *merge* their properties. This is why you need Discriminated Unions. ๐Ÿ’๐Ÿผโ€โ™‚๏ธI normally declare Function types via shorthand. I learned how to properly declare them as *callable objects* (!) & allow overloading! ๐Ÿ’๐Ÿผโ€โ™‚๏ธThe difference btwn {}, object and Object:
Reply Retweet Like
swyx ๐Ÿฆ† 3 Jun 19
Replying to @swyx
๐Ÿ’๐Ÿผโ€โ™‚๏ธEdge cases when TS bails out of excess property checking, and how to get it working again in those cases ๐Ÿ’๐Ÿผโ€โ™‚๏ธ"the keyin operator" - doesnt seem to be an official name of it but indexing into an object type via keys/arrays to get a type nested in it ๐Ÿ’๐Ÿผโ€โ™‚๏ธUser Defined type guards ๐Ÿ˜ฑ
Reply Retweet Like
swyx ๐Ÿฆ† 3 Jun 19
Replying to @swyx
๐Ÿ’๐Ÿผโ€โ™‚๏ธHow to simulate Nominal Types ๐Ÿ’๐Ÿผโ€โ™‚๏ธAn excellent explanation of how Ambient Declarations of Variables, Types, and Modules work in TypeScript ๐Ÿ’๐Ÿผโ€โ™‚๏ธDistributive conditionals - a step by step walkthru of how to reason about them
Reply Retweet Like
swyx ๐Ÿฆ† 3 Jun 19
Replying to @swyx
Among a ton of approachable, detailed explanations, 2 chapters stood out as unique in their careful treatment among the wider canon: 1. The JS Interop/Migration chapter 2. This Async/Concurrency chapter all in an excellent 300 page survey of TS I wholeheartedly recommend. /fin
Reply Retweet Like
swyx ๐Ÿฆ† Oct 16
Replying to @bcherny @seradio and 7 others
Reply Retweet Like
Adam Rackis 7 Jun 19
Hey fwiw - I'm sure the author would love a good review on Amazon ...
Reply Retweet Like
swyx ๐Ÿฆ† 7 Jun 19
oh right will do
Reply Retweet Like
Sebastian Sebald 8 Jun 19
Bought this for our company library after seeing your thread. Absolutely fantastic book. Finally someone did a deepdive and answers some more advanced questions!
Reply Retweet Like
swyx ๐Ÿฆ† 8 Jun 19
๐Ÿ”ฅ
Reply Retweet Like
Rubรจn Suet 3 Jun 19
I consider myself at a medium level for Typescript. The enough to React and struggling sometimes for some special cases. Is this book covering from the basics till the advance? Do you recommend it for mastering typescript?
Reply Retweet Like
swyx ๐Ÿฆ† 3 Jun 19
have a look at the table of contents and decide for yourself. if you arenโ€™t sure, consider the expected value from finding out vs the cost of the book.
Reply Retweet Like