summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-09-27 22:11:11 +0200
committerGitHub <noreply@github.com>2022-09-27 22:11:11 +0200
commita344368603063bcb281e743f3810ca1e4e46e85d (patch)
treeb1f01e491d648673b8d77ece48e200f66e09c2ed
parent980d65b4d0f26a841230acd662a1dcb3cf9c0247 (diff)
feat: Stabilize Deno.refTimer() and Deno.unrefTimer() APIs (#16036)
-rw-r--r--cli/dts/lib.deno.ns.d.ts14
-rw-r--r--cli/dts/lib.deno.unstable.d.ts16
-rw-r--r--runtime/js/90_deno_ns.js4
3 files changed, 16 insertions, 18 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index cdd3c11c7..97d3fed04 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -3560,4 +3560,18 @@ declare namespace Deno {
| SRVRecord[]
| string[][]
>;
+
+ /**
+ * Make the timer of the given `id` block the event loop from finishing.
+ *
+ * @category Timers
+ */
+ export function refTimer(id: number): void;
+
+ /**
+ * Make the timer of the given `id` not block the event loop from finishing.
+ *
+ * @category Timers
+ */
+ export function unrefTimer(id: number): void;
}
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 49e02d375..ec87fa9ca 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -1383,22 +1383,6 @@ declare namespace Deno {
/** **UNSTABLE**: New API, yet to be vetted.
*
- * Make the timer of the given id blocking the event loop from finishing.
- *
- * @category Timers
- */
- export function refTimer(id: number): void;
-
- /** **UNSTABLE**: New API, yet to be vetted.
- *
- * Make the timer of the given id not blocking the event loop from finishing.
- *
- * @category Timers
- */
- export function unrefTimer(id: number): void;
-
- /** **UNSTABLE**: New API, yet to be vetted.
- *
* A handler for HTTP requests. Consumes a request and returns a response.
*
* If a handler throws, the server calling the handler will assume the impact
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index 200bf73c2..e7b21640a 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -112,6 +112,8 @@
kill: __bootstrap.process.kill,
addSignalListener: __bootstrap.signals.addSignalListener,
removeSignalListener: __bootstrap.signals.removeSignalListener,
+ refTimer: __bootstrap.timers.refTimer,
+ unrefTimer: __bootstrap.timers.unrefTimer,
};
__bootstrap.denoNsUnstable = {
@@ -146,8 +148,6 @@
flockSync: __bootstrap.fs.flockSync,
funlock: __bootstrap.fs.funlock,
funlockSync: __bootstrap.fs.funlockSync,
- refTimer: __bootstrap.timers.refTimer,
- unrefTimer: __bootstrap.timers.unrefTimer,
Child: __bootstrap.spawn.Child,
spawnChild: __bootstrap.spawn.spawnChild,
spawn: __bootstrap.spawn.spawn,