You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
Note that I copied the object reference definition from @sanity/types, so maybe it could be used from there?
EDIT: I just realised all those types are already defined in @sanity-codegen/types and I didn't have it installed where I'm using the generated schemas (I'm in a monorepo with project+studio). After installing it's still not picking them up, will continue investigating.
The text was updated successfully, but these errors were encountered:
Generated types for
reference
fields result in that field beingany
. This is caused because theSanity.Reference<...>
type is used, which isany
.Example:
Manually adding the following code at the top of the generated types fixes the issue, so I guess this should be generated aswell by the codegen:
Note that I copied the object reference definition from
@sanity/types
, so maybe it could be used from there?EDIT: I just realised all those types are already defined in
@sanity-codegen/types
and I didn't have it installed where I'm using the generated schemas (I'm in a monorepo with project+studio). After installing it's still not picking them up, will continue investigating.The text was updated successfully, but these errors were encountered: