Hello fellas,
I’ve been working on something quietly for a while (I don’t like to make a fuss and then not follow through). I’ve been adding Zod support to collection2!
The implementation is now somewhat stable, but I really need your help testing it out. It’s based on the great work of @jkuester
You can try it with: aldeed:collection2@4.1.1-beta.3
Any feedback would be greatly appreciated. Thanks!
6 Likes
@harry97 sounds promising! Thanks for sharing.
Regarding types, does it support anything like Zod’s branded types for ids? In the past, when integrating Zod with Meteor collections, I’ve had to manually tweak the collection types to not get TypeScript errors when using normal TS strings and a branded type.
I believe for the most part yes but you can give it a go too and if you find any problems, I’ll gladly fix.
1 Like
@harry97 I see, thanks. I noticed you added tests for branded types after my comment, that was very mindful.
I made some comments on the PR on things I noticed, hope it can help.
Ah, you noticed? 
Thank you for your comments, I’ll attend to them and let you know. I’ve been noticing your great Meteor PRs, glad you’re on the forums with us now 
Please also discuss with us the future architecture: Collection2 + Zod Support (testers needed)
The more adapters we get the more it is important to think about things like complexity, dependencies, bundle size etc.