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
Icon field in defineType type error #716
Comments
I've tried this locally with no issues (although I should throw in a test to ensure this going forward). What version of typescript, sanity, and @sanity-typed/* are you using? @gercordero |
Hi @saiichihashimoto, I was using:
I say was as I've stoped using this package atm as I notice that my VSCode was running very slow with the Type instantiation is excessively deep and possibly infinite issue. Currently I'm using |
Hello, I'm following Sanity's docs for adding an icon to a Document and I'm getting a type error when trying to do so. The icon is rendering fine on Sanity's studio so I guess this is purely a wrong type definition error:
My code:
Typescript error:
I've tried doing
icon: DocumentTextIcon as unknown as ReactNode
which is not ideal but it doesn't work either as I'm getting this other error:And yes, I've also tried doing
icon: DocumentTextIcon as unknown as ComponentType | ReactNode
and it doesn't work as well.https://www.sanity.io/docs/icons-for-data-types
The text was updated successfully, but these errors were encountered: