I spent about 10-12 hours on this assignment across 3 days. I spent most of my time figuring out the inner workings of TypeScript and also debugging my code. I initially spent most of the first day writing my tests, but near the finish line I gave in and installed Github Copilot to finish my tests for me. I struggled the most with TypeScript, but I'm getting the hang of it now. I think having a better configuration setup would've made my experience smoother - I had to figure out Zod issues as well as other minor configuration issues.
I notice that I could "abuse" the any type and basically nullify all the benefits of the type checking features. TypeScript also doesn't do runtime checks so sometimes I run into an odd bug later along the line. However, typescript helped me catch situations where types are mismatched, or if there are missing properties in objects. I had issues figuring out how to type parameters, just because of new syntax I had to learn.
Writing tests was a bit boring, which was why I had Copilot write some of them by the end. However, I can't deny that there are benefits when using tests. It helped me catch a few bugs. There were a couple times where a test kept passing when it was supposed to fail, which helped me find bugs I probably wouldn't have found until later on. If I had to do things different, I should have wrote my tests first and then my backend, which would've helped me stay organized. I was thinking of approaching the assignment through test-driven lenses, but I was a bit impatient.