ffi: remove function signature property aliases#63482
Conversation
|
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.13% -0.05%
==========================================
Files 718 718
Lines 227731 228342 +611
Branches 42768 42919 +151
==========================================
+ Hits 205365 205807 +442
- Misses 14145 14274 +129
- Partials 8221 8261 +40
🚀 New features to boost your workflow:
|
| * `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'`. |
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
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?
There was a problem hiding this comment.
Ok, if @addaleax concurs I think you can continue with the changes.
d2f2716 to
dc9a62b
Compare
dc9a62b to
fc33b1a
Compare
| ERR_INTERNAL_ASSERTION, | ||
| }, | ||
| } = require('internal/errors'); | ||
| const assert = require('internal/assert'); |
There was a problem hiding this comment.
A lot of the assertions had to be modified anyway with this changeset, so as a driveby I've changed them all to the canonical internal assertion pattern.
This comment was marked as outdated.
This comment was marked as outdated.
|
Landed in df09b2a |
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.