If practical books are your type, this is for you! A practical, hands-on guide to write and think better about TypeScript. AND also gives us the background, the trade offs and glances to the internals: “Effective TypeScript: 62 Specific Ways to Improve Your TypeScript” by Dan Vanderkam
The “Effective Books” were a great idea introduced by Scott Meyers with Effective C++. In “Effective Effective Books” he defined ”Effective books consist of a collection of technical essays (“Items”), where each essay’s title comprises advice you should follow, and each essay’s body consists of a rationale for the advice.”
🌟 Why Matters?Section titled %5Bobject%20Undefined%5D
This type of approach – actionable, focused in the usage is great to learn. And then when you gain more and more insights through ysage you can understand better some advices in the book or even make your own mind. Some advices are opinated, because, well – everything has at least some degree of opinion. And this format is great for all types of developers, from the beginner to the pro and a book to go back again and again.
🔖 HighlightsSection titled %5Bobject%20Undefined%5D
Item 13: Know the Differences Between type and interface: […] Prefixing interface types with
Iis common in C#, and this convention made some inroads in the early days of TypeScript. But it is considered bad style today because it’s unnecessary, adds little value, and is not consistently followed in the standard libraries.
Item 48: Use TSDoc for API Comments: Use JSDoc-/TSDoc-formatted comments to document exported functions, classes, and types. This helps editors surface information for your users when it’s most relevant.
“Item 62: Don’t Consider Migration Complete Until You Enable noImplicitAny: Converting your whole project to .ts is a big accomplishment. But your work isn’t done quite yet. Your next goal is to turn on the
noImplicitAnyoption. TypeScript code without
noImplicitAnyis best thought of as transitional because it can mask real errors you’ve made in your type declarations.”
🐙 Go DepeerSection titled %5Bobject%20Undefined%5D
💻 Read MoreSection titled %5Bobject%20Undefined%5D
“Effective TypeScript, the site for the books has an active blog with new posts from time to time and worth a read as well:
- The Golden Rule of Generics
- Generic Tips Part 1: Use Classes and Currying to create new inference sites
- Generic Tips Part 2: Intersect what you have with whatever TypeScript wants
- Generic Tips Part 3: Avoid Repeating Type Expressions