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.
The Sanity namespace is added by @sanity-codegen/types, and then augmented by the types generated by the codegen (adding your namespace and your types).
So I would say that you need to make sure that:
@sanity-codegen/types is installed as dev dependency (or at least present by some other dependency)
the file with the generated types is included by your tsconfig.json
Hope that helps!
(full disclaimer: I also have problems with certain typings, as stated here #298)
Using the same approach as in README:
I do the same in my code but it doesn't give me proper types:
moreover, ESlint complains to the Sanity namespace being not found:
Are there any TS config changes needed to be done additionally to recognise the Sanity namespace?
The text was updated successfully, but these errors were encountered: