Fix TypeScript error in isEqual initialization#517
Merged
Conversation
The field object literal was missing the isEqual property in its initial definition, causing TypeScript to fail when it was assigned later. Add isEqual: tripleEquals to the initial field object to match the InternalFieldState type. Fixes TypeScript compilation broken by #480.
📝 WalkthroughWalkthroughA default equality comparator function ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
erikras
approved these changes
Feb 11, 2026
erikras-dinesh-agent
pushed a commit
to erikras-gilfoyle-agent/final-form
that referenced
this pull request
Feb 11, 2026
Integrated upstream changes: - PR final-form#480: Improved isEqual register initialization - PR final-form#517: Fixed TypeScript isEqual errors Preserved async validation tracking: - instanceId for stable field instance tracking - asyncValidationCount and asyncValidationKey The merge keeps the upstream's robust isEqual initialization logic while maintaining the per-field async validation tracking needed to prevent race conditions.
This was referenced Feb 11, 2026
Contributor
Author
|
Published in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #480 introduced a TypeScript compilation error:
This is breaking CI on all PRs because the prepare hook runs TypeScript compilation.
Root Cause
The field object literal was missing the
isEqualproperty in its initial definition (line 878-895), but it was being assigned later (line 902-905). TypeScript couldn't narrow the union type properly.Fix
Add
isEqual: tripleEqualsto the initial field object literal to match theInternalFieldStatetype.Verification
✅
npx tsc --noEmitnow passes with no errorsUrgency
🔥 Blocking - This breaks CI for all new PRs including #516 (size-limit migration)
Summary by CodeRabbit