News for hackers. Stuff that matters.
Re:Tricks I wish I knew when I learned TypeScript by pbowyer on Tuesday October 12, 2021 @03:05PM (#28843741)
> There are libraries which can automate this for you which is the route I would recommend

Which libraries do you recommend? I've had to do this a couple of times in my current project and it's painful (and I made mistakes).

Re:Tricks I wish I knew when I learned TypeScript by Etheryte on Tuesday October 12, 2021 @06:09PM (#28845660)
Personally I really enjoy Typanion [0] since it's very similar to Yup [1] which I previously had extensive experience with. You can find more alternatives and a lengthy discussion about the whole problem space and its history in [2].

[0] https://github.com/arcanis/typanion

[1] https://github.com/jquense/yup

[2] https://github.com/microsoft/TypeScript/issues/3628