TanStack / TanStack/form

Type instantiation is excessively deep and possibly infinite - With Simple Reproduction

Open
#1,474 0 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: types type: enhancement v1 v2
Dominant language
TypeScript
Stars
6.7k
Forks
682
Avg merge
5d 18h
Merged PRs (30d)
7

Description

Describe the bug

This is another instance of the TS error. The reproduction is based on the solid example with one new field.

That JsonData type is taken from here

Your minimal, reproducible example

https://codesandbox.io/p/devbox/quizzical-snyder-w4wf5q?file=%2Fsrc%2Findex.tsx

Steps to reproduce
  1. Open the reproduction
  2. See the error

Image

Expected behavior

I would expect the form to handle this recursive type.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform
TanStack Form adapter

solid-form

TanStack Form version

1.9.0

TypeScript version

5.8.2

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked CodeSandbox reproduction and inspect src/index.tsx, the only file identified in the report. Reproduce the error with TypeScript 5.8.2 and the solid-form adapter; done means the recursive JsonData type is accepted without the “Type instantiation is excessively deep” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.