That said, I totally appreciate how many projects/teams benefit from TS. My need for types is reduced because: 1. My teams tend to compose many small apps instead of a few big apps 2. I work in React, where PropTypes help 3. ESLint catches many issues too
-
-
Prikaži ovu nit
-
4. I typically declare a centralized mock data structure and code against that. This documents all object shapes and avoids repeating object creation code. 5. I write automated tests with Jest. 6. I heavily leverage npm packages, which often provide .ts files that
@code parses.Prikaži ovu nit -
7. I compile code with Babel which produces useful compile-time errors 8. I centralize React propType declarations and consistently declare object shapes with propTypes 9. I avoid mutating object shapes. I declare separate well-named objects when properties differ.
Prikaži ovu nit -
10. I centralize input normalization and normalize API call responses. This assures objects maintain consistent data structures and casing, and helps assure properties exist. 11. I strive to centralize state changes and enjoy immutable structures via Immer.
Prikaži ovu nit
Kraj razgovora
Novi razgovor -
-
-
type safety (while a nice bonus) is only a small part of it though! using a type system, the editor knows more about your code and can give you smarter autocomplete than with untyped code, plus super helpful refactoring goodnesses, and that's the primary draw for me
- Još 4 druga odgovora
Novi razgovor -
-
-
If you are not working with a node.js backend or you just use js for very specific stuff I think is ok. But a complete backend app in node.js is completely necessary.
-
Yeah I can see how a Node backend or library is a good use case. I mostly build React apps and find proptypes and tests sufficient
- Još 6 drugih odgovora
Novi razgovor -
-
-
I recently rewatched most of your React/Redux/ES6 course. Noticed there were a few occasions throughout where typos crept in & you had to debug. I found myself thinking on each occasion: "If only he used TypeScript"
Great course tho, thanks for sharing ur wisdom/experience 
-
Ha! Caught me!
I certainly have occasional type issues. I just find they’re not typically time consuming to fix. Perhaps because I tend to encourage my teams to write many small apps instead of a few big apps - Još 2 druga odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.