News for hackers. Stuff that matters.
Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by JoshuaScript on Sunday October 14, 2018 @11:22PM (#18217189)
Thanks, it started out as regular, valid JS, then I figured I might as well convert it to TypeScript, and I did so (perhaps too) quickly. I do plan to add stronger typing later.
Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by eksemplar on Monday October 15, 2018 @02:31AM (#18217806)
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.
Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by h1d on Monday October 15, 2018 @09:56AM (#18219655)
You'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.

Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by eksemplar on Monday October 15, 2018 @10:17AM (#18219855)
I agree but I’d pick graphql for that instead of typescript.
Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by jeremychone on Monday October 15, 2018 @11:24AM (#18220460)
Not sure TypeScript and GraphQL are mutually exclusive.
Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by eksemplar on Monday October 15, 2018 @02:51PM (#18222541)
They aren’t, but graphql would give you safer types in your api than typescript.
Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by jeremychone on Friday October 19, 2018 @04:44PM (#18259903)
Not 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.

Re:Show HN: I Built a Metasearch Engine with React, Redux, E... by JoshuaScript on Monday October 15, 2018 @02:38PM (#18222417)
Honestly, I'm using it for it's marketability. I haven't yet found it particularly useful.