summaryrefslogtreecommitdiff
path: root/runtime/js/40_fs_events.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/40_fs_events.js')
-rw-r--r--runtime/js/40_fs_events.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/js/40_fs_events.js b/runtime/js/40_fs_events.js
index 13cacc36b..0bc614335 100644
--- a/runtime/js/40_fs_events.js
+++ b/runtime/js/40_fs_events.js
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { core, primordials } from "ext:core/mod.js";
+import { core, internals, primordials } from "ext:core/mod.js";
const {
BadResourcePrototype,
InterruptedPrototype,
@@ -49,6 +49,10 @@ class FsWatcher {
// TODO(kt3k): This is deprecated. Will be removed in v2.0.
// See https://github.com/denoland/deno/issues/10577 for details
return(value) {
+ internals.warnOnDeprecatedApi(
+ "Deno.FsWatcher.return()",
+ new Error().stack,
+ );
core.close(this.rid);
return PromiseResolve({ value, done: true });
}