christopherafbjur / sanity-plugin-icon-picker

MIT License
29 stars 22 forks source link

Add compatibility with `@sanity-typed` #62

Open saiichihashimoto opened 8 months ago

saiichihashimoto commented 8 months ago

Watch How to Type Your Sanity Document and Client

@sanity-typed enables typed output from sanity's groq clients!

When using untyped plugins (like this one), it'll provide an unknown for the plugin's values, which isn't ideal. Luckily if you use the typed definePlugin and castFromTyped methods, you can enable typed values and continue to support your default users!

Here is the guide on the changes in this PR.