We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0438a5d commit c8be6a5Copy full SHA for c8be6a5
lib/internal/modules/esm/handle_process_exit.js
@@ -2,9 +2,11 @@
2
3
const { exitCodes: { kUnfinishedTopLevelAwait } } = internalBinding('errors');
4
5
-// Handle a Promise from running code that potentially does Top-Level Await.
6
-// In that case, it makes sense to set the exit code to a specific non-zero
7
-// value if the main code never finishes running.
+/**
+ * Handle a Promise from running code that potentially does Top-Level Await.
+ * In that case, it makes sense to set the exit code to a specific non-zero value
8
+ * if the main code never finishes running.
9
+ */
10
function handleProcessExit() {
11
process.exitCode ??= kUnfinishedTopLevelAwait;
12
}
0 commit comments