3 ms·
LMAO. Yes, I love ESM modules. So maybe more like 2012 or 2015. Would you like to see TypeScript?
by metaskills 3y ago
LMAO. Yes, I love ESM modules. So maybe more like 2012 or 2015. Would you like to see TypeScript?
- alluro2 3y agoThank you for using vanilla JS!
- taf2 3y agoYes this is great so much easier to work with
- metaskills 3y agoY'all just made my day!
- fy20 3y agoNot OP, but I use TypeScript because it adds a layer of safety to the codebase. It's like having good test coverage - you can make large changes and if the tests pass (the code compiles), you can be fairly confident that you didn't mess anything up. I've written Ruby for years, so I'm used to dynamically typed languages. But JavaScript is it's own level of special, and there's so many ways you can accidentally mess things up. Having tests cover every single path (especially failure paths) can be very time consuming, and often hard or messy to setup (how would you mock the OpenAI module returning an error when adding metadata to a thread?), where as using something like TypeScript can make sure your code handles all paths somewhat correctly (at least as well as the types you defined). Your code looks clean, and you appear to have good test coverage, so you do you though :-)
- deleted 3y ago[deleted]
- zknowledge 3y agoI was pleasantly surprised to see the .js. THANK YOU!!
- meiraleal 3y agoPlease, no