ffi: remove function signature property aliases#63482
Open
Renegade334 wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
35c2eee to
52cedc7
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63482 +/- ##
==========================================
- Coverage 90.17% 90.14% -0.04%
==========================================
Files 718 718
Lines 227731 227697 -34
Branches 42768 42750 -18
==========================================
- Hits 205365 205255 -110
- Misses 14145 14218 +73
- Partials 8221 8224 +3
🚀 New features to boost your workflow:
|
addaleax
approved these changes
May 22, 2026
| * `result`, `return`, or `returns` for the return type. | ||
| * `parameters` or `arguments` for the parameter type list. | ||
| * `result` {string} A [type name][type names] specifying the return type of the | ||
| function or callback. **Default:** `'void'`. |
Member
There was a problem hiding this comment.
If I can cast a vote for keeping return instead of result, I'd like to do so – that's just generally more in line with what the standardized terminology around function signatures is
Contributor
There was a problem hiding this comment.
Well, if I have to pick one I'd go for return and arguments.
@Renegade334 Are you fine with doing so?
ShogunPanda
approved these changes
May 22, 2026
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.
Refs: https://github.com/nodejs/node/pull/62072/changes#r3067834658
Having multiple property name aliases for function signature objects doesn't add utility, but from a TS perspective, it blocks being able to infer the resultant function type from the shape of the signature object. With all else being equal, it'd be useful to get rid of them.
In the absence of any of these names being unambiguously more appropriate than the others,
parametersandresultappear to be the most canonical.