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

ROADMAP #2

Open
mieszkosabo opened this issue Mar 1, 2024 · 3 comments
Open

ROADMAP #2

mieszkosabo opened this issue Mar 1, 2024 · 3 comments

Comments

@mieszkosabo
Copy link
Owner

mieszkosabo commented Mar 1, 2024

This is the roadmap for v1. I probably won't publish new version until most important features are implemented.

@mieszkosabo mieszkosabo pinned this issue Mar 21, 2024
This was referenced Apr 15, 2024
@midzdotdev
Copy link

Nice project and idea.

Looking at this with a lack of context, I thought I'd share an idea with you. In order for this project to succeed (we may already be along the same lines on this), you will have to merge with Zod.

The Zod library could be composed in the way that you're doing here, migrated to this structure if you will. They could do so without any breaking changes by still exposing everything as z, but allowing users to opt into something like initZod([string, number]) to reduce bundle size if desired.

@mieszkosabo
Copy link
Owner Author

Hey @midzdotdev, thanks for your input!

When I started this project my goal wasn't to create this production-ready 1:1 drop-in replacement for Zod or for it to become popular. I came up with this technique of combining type-level programming with JS Proxies and I wanted to explore it on a concrete example.

I paused my development efforts, because I came to a conclusion that actually in order for this project to succeed I will need to create a "general solution" for creating these "method-chainable-yet-tree-shakable" libraries. Because otherwise I feel like that's too difficult. However inventing this solution requires a lot of focused time, which I had been lacking recently as I was working in other stuff. I keep it on my todo list and I plan to come back to it eventually though!

Now my thoughts on merging this into Zod. In theory it would be lovely and, as you mentioned, perfectly doable without any breaking changes. The issue is that I haven't yet measured the overhead of using this approach and I have a feeling it's non-trivial: in both runtime and compilation-time. So it might actually degrade the experience of people who don't care about this change.

@midzdotdev
Copy link

Ahhh that makes perfect sense, and quite a fun example it is. I'd be keen to see a general solution for this. I'd be happy to pair on it to better understand proxies, I've not really had the chance to experiment much with them.

I've just been snooping through your profile and https://github.com/mieszkosabo/tartak seems like a fun project too. I personally like to delve into the advanced aspects of Typescript at the type-level but it's taking me a while to wrap my head around the rationale and the solution of Tartak.

Nice stuff! All the best 👋

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

No branches or pull requests

2 participants