summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.unstable.d.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2022-03-23 12:04:20 +0900
committerGitHub <noreply@github.com>2022-03-23 12:04:20 +0900
commit7feb25d448b356ac869ef919c57ef314382a8eb7 (patch)
tree35b5137590366e915750ab19d6c3b7dbd3dfe32d /cli/dts/lib.deno.unstable.d.ts
parent5c9844e5f7074b2623ff0ddd69f5adcd1356ae38 (diff)
feat(unstable): add ref/unref to Listener (#13961)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/dts/lib.deno.unstable.d.ts')
-rw-r--r--cli/dts/lib.deno.unstable.d.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index a61d672f7..b3bbef030 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -1296,6 +1296,22 @@ declare namespace Deno {
alpnProtocols?: string[];
}
+ export interface Listener extends AsyncIterable<Conn> {
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Make the listener block the event loop from finishing.
+ *
+ * Note: the listener blocks the event loop from finishing by default.
+ * This method is only meaningful after `.unref()` is called.
+ */
+ ref(): void;
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Make the listener not block the event loop from finishing.
+ */
+ unref(): void;
+ }
+
/** **UNSTABLE**: New API should be tested first.
*
* Acquire an advisory file-system lock for the provided file. `exclusive`