How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

Would Sanity accept PRs to add proper TypeScript types to defineType/defineField?

18 repliesLast updated: Nov 29, 2025

Hey! I built
@sanity-typed/types
(link ) in an effort to get proper sanity types out of
defineType
,
defineField
, and
defineArrayMember
. I'd like to merge my changes as much as possible into sanity itself. My question is, would I just start making PRs to the repo? To get some of these changes in, I'd have to make some big changes and I'm hoping to get some confirmation that this is the direction sanity wants to go before I invest the time to do that.
AI Update

That's awesome that you built @sanity-typed/types! Contributing improved TypeScript types to Sanity would be a great addition to the project. Here's how to approach this:

Start with the Contributing Guidelines

Before diving into PRs, definitely check out the CONTRIBUTING.md in the Sanity repo. The key points are:

Since you mentioned needing to make "big changes" to get your improvements into Sanity, here's what I'd suggest:

Why This Matters

Getting alignment upfront is crucial because:

The Sanity team is generally very open to community contributions, but for architectural changes to core types, they'll definitely want to discuss the approach before you invest weeks of work. Starting the conversation now will save you time and increase the chances of your work being merged!

Show original thread
18 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions