5 ms·
What advantages did you get from typescript? Seems like type safety is a huge trade off from what you lost by adding those amounts of complexity, especially whe
by eksemplar 8y ago
What advantages did you get from typescript? Seems like type safety is a huge trade off from what you lost by adding those amounts of complexity, especially when you’re not really utilising it.
- h1d 8y agoYou'd get more benefit if you're developing API where random others are consuming your code for them to use API properly. But still, it can still save you from obvious mistakes even for a one man project.
- eksemplar 8y agoI agree but I’d pick graphql for that instead of typescript.
- jeremychone 8y agoNot sure TypeScript and GraphQL are mutually exclusive.
- eksemplar 8y agoThey aren’t, but graphql would give you safer types in your api than typescript.
- jeremychone 8y agoNot sure one gives you safer typing than the other in absolute. They both have a different context/purpose. TypeScript is great for typing a code base for function calls type of APIs, whereas GraphQL is great to express types for inter-system communication (usually over HTTP). Using GraphQL to type your in-process API would be overkilled and would require quite a bit of contortionism, and while you can share same TypeScript types between your end-points interfaces (and can be a good first step), inter-process communication is better expressed with something like GraphQL or Protobuf.
- JoshuaScript 8y agoHonestly, I'm using it for it's marketability. I haven't yet found it particularly useful.