You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 augmentsanity
'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.
The text was updated successfully, but these errors were encountered: