-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Type error on array of block and image #712
Comments
I'm having the exact same issue. The Portable Text component works fine in Sanity studio but typescript complains when having more than 1 type of array member inside the |
Im facing the same error |
I've tried this locally with no issues. What version of typescript, sanity, and @sanity-typed/* are you using? @LeoLYW12138 @gercordero @MartCube |
"@sanity-typed/next-sanity": "^2.1.2",
"@sanity-typed/types": "^6.3.3",
"sanity": "^3.37.2",
"typescript": "5.4.5" |
I'm trying to transform sanity schema to sanity-typed schema when I encounter this error.
The official doc suggests that we can add images to Portable Text by appending a new type object to the array as such
However, when I define equivalent schema with sanity-typed, like this
I am having type error
It seems that I cannot put array members of different types into the same array under the current version of
@sanity-typed/types@6.3.3
andtypescript@5.4.5
The text was updated successfully, but these errors were encountered: