https://github.com/saiichihashimoto/sanity-typed
Completing sanity's developer experience with typescript (and more)!
https://github.com/saiichihashimoto/sanity-typed
cms groq sanity sanity-io types typescript
Last synced: 5 months ago
JSON representation
Completing sanity's developer experience with typescript (and more)!
- Host: GitHub
- URL: https://github.com/saiichihashimoto/sanity-typed
- Owner: saiichihashimoto
- License: mit
- Created: 2023-05-05T21:59:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-07T19:37:18.000Z (5 months ago)
- Last Synced: 2025-05-09T14:41:38.495Z (5 months ago)
- Topics: cms, groq, sanity, sanity-io, types, typescript
- Language: TypeScript
- Homepage:
- Size: 8.51 MB
- Stars: 157
- Watchers: 3
- Forks: 8
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# @sanity-typed
[](https://github.com/saiichihashimoto/sanity-typed/pulls?q=is%3Apr+is%3Aclosed)
[](https://github.com/saiichihashimoto/sanity-typed/stargazers)
[](https://github.com/saiichihashimoto/sanity-typed/graphs/contributors)
[](https://github.com/saiichihashimoto/sanity-typed/labels/help%20wanted)
[](LICENSE)[](https://github.com/sponsors/saiichihashimoto)
Completing [sanity](https://www.sanity.io/)'s developer experience with typescript (and more)!
## Page Contents
- [Fully Typed Sanity Client](#fully-typed-sanity-client)
- [Packages](#packages)
- [Fully Offline Sanity Client](#fully-offline-sanity-client)
- [Packages](#packages-1)
- [Runtime Validated Sanity Documents](#runtime-validated-sanity-documents)
- [Packages](#packages-2)
- [More Typed Packages](#more-typed-packages)
- [Packages](#packages-3)## Fully Typed Sanity Client
[](https://github.com/saiichihashimoto/sanity-typed/assets/2819256/13c28e6a-74a7-4b3c-8162-61fae921323b)
### Packages
- [`@sanity-typed/types`](packages/types): Infer Sanity Document Types from Sanity Schemas
- [`@sanity-typed/client`](packages/client): [@sanity/client](https://github.com/sanity-io/client) with typed GROQ Results
- [`@sanity-typed/groq`](packages/groq): Infer [GROQ](https://github.com/sanity-io/groq) Result Types from GROQ strings## Fully Offline Sanity Client
[](https://github.com/saiichihashimoto/sanity-typed/assets/2819256/fed71d58-6b08-467a-a325-b197f563a328)
### Packages
- [`@sanity-typed/faker`](packages/faker): Generate Mock Data from Sanity Schemas
- [`@sanity-typed/client-mock`](packages/client-mock): Mock @sanity-typed/client for local development and testing
- [`@sanity-typed/groq-js`](packages/groq-js): [groq-js](https://github.com/sanity-io/groq-js) with typed GROQ Results## Runtime Validated Sanity Documents
[](https://github.com/saiichihashimoto/sanity-typed/assets/2819256/c014f8aa-a97a-4093-9924-94a2ecee4584)
### Packages
- [`@sanity-typed/zod`](packages/zod): Generate [Zod](https://zod.dev) Schemas from Sanity Schemas
## More Typed Packages
### Packages
- [`@sanity-typed/next-sanity`](packages/next-sanity): [next-sanity](https://github.com/sanity-io/next-sanity) with typed GROQ Results
- [`@sanity-typed/preview-kit`](packages/preview-kit): [@sanity/preview-kit](https://github.com/sanity-io/preview-kit) with typed GROQ Results (deprecated)
- [`@portabletext-typed/react`](packages/pt-react): [@portabletext/react](https://github.com/portabletext/react) with typed arguments
- [`@portabletext-typed/to-html`](packages/pt-to-html): [@portabletext/to-html](https://github.com/portabletext/to-html) with typed arguments