Repository navigation
fix(types): declare FormData prototype methods - #6056
Merged
Merged
Conversation
Match the methods installed on FormData.prototype by iteratorMixin. This allows subclasses to override them and call super. Cover all five methods and an arrow-function override with type tests. Refs: nodejs/node#58481 Assisted-by: a coding assistant
tsctx
approved these changes
Oct 20, 2026
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6056 +/- ##
==========================================
- Coverage 91.57% 91.55% -0.02%
==========================================
Files 113 113
Lines 43938 43938
==========================================
- Hits 40235 40228 -7
- Misses 3703 3710 +7 β View full report in Codecov by Harness. π New features to boost your workflow:
|
Merged
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.
This relates to...
Refs: nodejs/node#58481
Rationale
iteratorMixin installs these functions on FormData.prototype, but
the declarations describe instance properties. This prevents valid
subclass overrides and super calls in TypeScript.
Changes
Features
N/A
Bug Fixes
Breaking Changes and Deprecations
No runtime changes or deprecations. Parameter and return types are unchanged.
Status
tsd, lint, and test:fetch passed. test:typescript encounters the
Windows wildcard issue in #5928; explicit-file compilation passed.
The full npm test suite was not run.
AI assisted with the patch and tests.