From a28c22b4f3eaf355e532ecd8cc078596aa14ebb2 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sat, 16 Apr 2022 18:53:31 +0530 Subject: [PATCH] doc: add return type Signed-off-by: Darshan Sen --- doc/api/worker_threads.md | 4 +++- test.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 test.js diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 4a35f381c3067c..18a917f889284c 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -1152,7 +1152,9 @@ added: REPLACEME > Stability: 1 - Experimental -If true, the `Worker` object will keep the Node.js event loop active. +* Returns: {boolean} + +If `true`, the `Worker` object will keep the Node.js event loop active. ### `worker.ref()` diff --git a/test.js b/test.js new file mode 100644 index 00000000000000..d354f693cadb86 --- /dev/null +++ b/test.js @@ -0,0 +1 @@ +require('child_process').spawn('sleep', ['2'], ).unref();