Skip to content

Globally Augmenting sanity as a polyfill #653

Open
@saiichihashimoto

Description

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.

Metadata

Assignees

No one assigned

    Labels

    help wantedPlease help me! I'm lonely.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions