Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a library for type validation #3

Open
mybearworld opened this issue Jul 31, 2024 · 4 comments
Open

Use a library for type validation #3

mybearworld opened this issue Jul 31, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@williamhorning
Copy link
Collaborator

while doing the type validation ourselves isn't the greatest, adding zod isn't something i want to do. zod doesn't publish to jsr (yet, see colinhacks/zod#3506) so the only option would be to depend on the node package. i also dislike that idea, as adding zod as a dependency would increase the minified + gzipped size of this package by 5x. i really don't want to depend on external packages other than the eventemitter used, so unless there's a reason to use zod that would make the extra size worth it, id really rather not.

@williamhorning williamhorning closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2024
@mybearworld
Copy link
Author

Would Valibot be an option then?

@williamhorning
Copy link
Collaborator

I still have concerns about bundle size since one of my main goals is to have as few dependencies as possible for this project. The only dependency we have right now is our eventemitter, and that’s because I don’t think we should reimplement that. I’ll reopen this, but this isn’t coming until after the first stable release.

@williamhorning williamhorning changed the title Use zod for the type assertion stuff Use a library for type validation Jul 31, 2024
@williamhorning williamhorning added the enhancement New feature or request label Jul 31, 2024
@williamhorning williamhorning added this to the post-1.0.0 milestone Jul 31, 2024
@NotFenixio
Copy link

I mean, according to their website the package is only 600 bytes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants