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

Globally Augmenting sanity as a polyfill #653

Open
saiichihashimoto opened this issue Jan 24, 2024 · 0 comments
Open

Globally Augmenting sanity as a polyfill #653

saiichihashimoto opened this issue Jan 24, 2024 · 0 comments
Labels
help wanted Please help me! I'm lonely.

Comments

@saiichihashimoto
Copy link
Owner

saiichihashimoto commented Jan 24, 2024

An idea that @judofyr suggested was essentially a polyfill. Rather than switching imports to @sanity-typed, we could enable importing something like @sanity-typed/polyfill and it would globally augment sanity's native packages to use @sanity-typed/* under the covers.

I don't see this being possible but we should see. One of the reason we went with these "wrapper" packages in the first place was ultimately because globally augmenting creates intersections, and we often want to fully replace a type rather than intersect, so it wasn't possible. That being said, with some work on @sanity-io's side, we may be able to get flexible enough types to accomplish something here.

@saiichihashimoto saiichihashimoto added help wanted Please help me! I'm lonely. automerge Automatically merges the PR if all status checks pass. Applied by Kodiak. and removed help wanted Please help me! I'm lonely. automerge Automatically merges the PR if all status checks pass. Applied by Kodiak. labels Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Please help me! I'm lonely.
Projects
None yet
Development

No branches or pull requests

1 participant