3 ms·
I don't have a book recommendation for you (what helped me was the standard documentation and about a year of daily dev time), but an observation: Your team is
by iguana 8y ago
I don't have a book recommendation for you (what helped me was the standard documentation and about a year of daily dev time), but an observation:
Your team is likely using an overly restrictive tsconfig.json. No-implicit-any, for example.
Make it less restrictive, and you then have typing and no penalty for punting on it until later.
If using an IDE, the effort into defining types is immediately rewarded with autocomplete for API/backend AND client code, and we even export the types for use by a Monaco editor inside an internal app.
- DCoder 8y agoOne more thing that IMO gets overlooked too often: TypeScript can typecheck your JSX markup. Compare that to any string-based templating engine, such as Knockout.js templates or jquery.tmpl, where you have to learn its snowflake DSL, you get no autocomplete, no checks for undefined variables or syntax errors… If I never have to explain <!-- ko if: !condition --> vs <!-- ko ifnot: condition --> again, I'll be a happy man.
- koolba 8y agoThis is the type of thing to which I was referring. A server interface is updated to return a different data type or renamed, the client shares the same interface, type checking for TSX (TypeScript JSX) catches the name or type of the property is invalid, and you can immediately fix it. No more grepping an entire codebase to see all the places that something is referenced and praying that you updated all of them. (And praying that you updated them correctly!)
- 0xADEADBEE 8y agoI suspect you're right - we probably got a bit caught up in best practices to our detriment. Thank you for this.