Best products from r/typescript

We found 6 comments on r/typescript discussing the most recommended products. We ran sentiment analysis on each of these comments to determine how redditors feel about different products. We found 5 products and ranked them based on the amount of positive reactions they received. Here are the top 20.

Top comments mentioning products on r/typescript:

u/chernn · 12 pointsr/typescript

If you’re willing to spend $30, I wrote O’Reilly’s Programming TypeScript, which goes into depth on all of TypeScript’s features (including more advanced ones that I haven’t seen covered elsewhere). I also tried to explain the “why” behind each of those features, and what kinds of problems they help you solve. The book was edited by Daniel of the TypeScript team, and has tons of examples, exercises, pictures, explanations, etc.

https://www.amazon.com/gp/product/1492037656

If you don’t have $30 to spend, the book is on Safari, which has a free trial: https://learning.oreilly.com/register/.

Or if you don’t have the time to read a whole book, check out one of the online resources people in this thread linked — the TS handbook and Marius’s blog are both great.

u/PedroMutter · 2 pointsr/typescript

Thanks for your advice. The O'reilly book you mentioned is this one? (Building-Microservices-Sam-Newman). And could you send me some material that you like please? (blog posts included).

u/pagalvin · 1 pointr/typescript

This book is chock full of good design patterns and written in Java. Much of the code will translate very nicely to TypeScript: https://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678/ref=sr_1_8?ie=UTF8&qid=1496408897&sr=8-8&keywords=object+oriented+programming

Of course, it's not the only book, but I found it really useful.

I've been writing a book on TypeScript and just finished the first cut at TypeScript classes. It has a number of examples. They are very simple, but get into interfaces, classes and so forth. Here's the link: https://pagalvin.gitbooks.io/yet-another-typescript-book/content/

Classes are covered in chapter 7 and especially chapter 8.

u/tehnologie · 1 pointr/typescript

Actually, there is no problem in sending an object:

const obj1 = {
name: "obj1",
otherField: "whatever"
};

...as a parameter to a function that takes an object of type:

type MyType = {
name: string
};

typeof obj1 is a subtype of MyType, as it includes all the properties of MyType (namely name: string).

I just tested that code with strict set to true, and the only error I get is inside foo, when you try to:

console.log(bar.otherField)

At that point, TypeScript has no way of knowing that bar has .otherField at runtime, and it's a perfectly legitimate complaint on its part. If you want foo to execute logic specific to typeof obj1 and to do something with the result, it's a good use case for higher order functions.

e.g.

const foo2 = <T extends MyType>(obj: T, fn: (obj: T) => / whatever fn should return /) => / implementation /

I highly recommend the book Effective TypeScript: 62 Specific Ways to Improve Your TypeScript

u/insulind · 2 pointsr/typescript

I'm a C# dev and I found this book useful Pro TypeScript: Application-Scale JavaScript Development https://www.amazon.co.uk/dp/1484232488/ref=cm_sw_r_cp_apa_aCn3AbXHX24T6