-
Notifications
You must be signed in to change notification settings - Fork 824
Open
Labels
Domain: Type CheckingRelated to type checking, grammar checkingRelated to type checking, grammar checkingType OrderingAn issue related to ordering of typesAn issue related to ordering of types
Description
Steps to reproduce
Sorry that this isn’t more minimal, as it still uses two external libraries (TanStack Form and zod), but I have trimmed it down from the original as much as possible.
As discussed with Jake on Bluesky, this could very well be an issue with TanStack Form’s typings, but I’d still expect tsgo and ts 5.9 to behave identically.
Behavior with typescript@5.9
no error
Behavior with tsgo
Error in line 22:
Type instantiation is excessively deep and possibly infinite.
As a workaround, we can cast defaultValues:
defaultValues: {[name]: initialValue} as Record<TFieldName,z.infer<TSchema>[TFieldName]>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Domain: Type CheckingRelated to type checking, grammar checkingRelated to type checking, grammar checkingType OrderingAn issue related to ordering of typesAn issue related to ordering of types