doc: add inline comment hints on finalizer signatures - #1738
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1738 +/- ##
=======================================
Coverage 63.69% 63.69%
=======================================
Files 3 3
Lines 2063 2063
Branches 730 730
=======================================
Hits 1314 1314
Misses 162 162
Partials 587 587 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| #endif // NAPI_VERSION > 8 | ||
|
|
||
| #ifdef NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER | ||
| // FinalizerType must implement `void operator()(Env env)`. |
There was a problem hiding this comment.
Have we considered using C++ Concepts for this instead of these human-only annotations?
There was a problem hiding this comment.
(Though clearly this doesn't need to block the PR...)
There was a problem hiding this comment.
it will be a semver-major to bump minimum c++ version to c++20. Right now node-addon-api still supports c++17 as in node v18/v20
Line 478 in 13c28f6
| #endif // NAPI_VERSION > 8 | ||
|
|
||
| #ifdef NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER | ||
| // FinalizerType must implement `void operator()(Env env)`. |
There was a problem hiding this comment.
Should the Markdown documentation files also be updated to reflect the implementation signature for the callbacks? 🤔
Add inline comment hints on finalizer signatures.
When C++20 is the baseline, we should add C++ concepts to hint about the templated parameters.