You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the C API does not have catch or then methonds, however, it should be possible to add them to the C++ API to help make it easier to use them properly.
@vmoroz also mentioned that it might be good to reference the JavaScript promise API and make the new documentation consistent where it makes sense. Maybe worth looking to see what other ones that are available in JavaScript might make sense to consider as well.
@legendecas mentioned should be cautious with some of the new wrappers that have been added more recently as they may not be available in older Node.js versions.
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
Discussion on the Node-API meeting today, #1668 should be sufficient to hint that the Promise Then/Catch methods return a new promise and an onRejection handler is available as a second parameter on the Then method, just like JS Promise APIs.
Activity
mhdawson commentedon Jun 13, 2025
@vmoroz also mentioned that it might be good to reference the JavaScript promise API and make the new documentation consistent where it makes sense. Maybe worth looking to see what other ones that are available in JavaScript might make sense to consider as well.
@legendecas mentioned should be cautious with some of the new wrappers that have been added more recently as they may not be available in older Node.js versions.
github-actions commentedon Sep 12, 2025
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
legendecas commentedon Sep 12, 2025
Discussion on the Node-API meeting today, #1668 should be sufficient to hint that the Promise Then/Catch methods return a new promise and an onRejection handler is available as a second parameter on the Then method, just like JS Promise APIs.
This can be closed as done now.