array() of blocks() are readonly but PortableText requires a mutable value. #156
Comments
I don't remember where in the typing it is, but having this be For clarity: returning a |
I realized that 5 minutes after i posted, still learning sanity, just jumped on it yesterday :) i’ll see if i can come up with a fix :) |
Just to be sure, i’m just making the array/block types mutable, or do you want to drop readonly from everything? It sort of makes sense that they’re all readonly, you’re not supposed to mutate them, it just makes it harder to pass them to other code that (maybe incorrectly) don’t expect a readonly type. |
It's easy enough to just get rid of readonly alltogether, just remove |
🎉 This issue has been resolved in version 1.15.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Currently you have to go through some hoops to not get errors.
Am i doing something wrong, or could we maybe use the
readOnly
prop in the schema to make these mutable in the resulting types?The text was updated successfully, but these errors were encountered: