Closed gercordero closed 6 months ago
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 sanity schema extract && sanity typegen generate
to generate types but I'm really looking forward to use this package in the future as it looks very promising.
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