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
fix: add JsonValue short-circuit to prevent TS2589 on recursive type fields
JsonValue is a recursive type that causes TypeScript to hit depth limits
when ExtractInsertType/ExtractUpdateType/StripKyselyWrapper try to evaluate
conditional checks. Adding a JsonValue guard before the `extends` check
avoids expanding the recursive type entirely.
Also fixes pre-existing exactOptionalPropertyTypes error in dmmf-mocks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
# Changelog
2
2
3
+
## 5.3.3
4
+
5
+
### Patch Changes
6
+
7
+
- Fix TS2589 "Type instantiation is excessively deep" for schemas with JsonValue fields
8
+
9
+
Added short-circuit guards in `ExtractInsertType`, `ExtractUpdateType`, and `StripKyselyWrapper` type utilities to avoid expanding the recursive `JsonValue` type before evaluating conditional type checks. This fixes the TS2589 error when using `Selectable<T>`, `Insertable<T>`, or `Updateable<T>` on schemas containing `JsonValue | null` fields (e.g., Prisma `Json?` columns).
0 commit comments