diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-24 14:57:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 14:57:54 +0100 |
commit | 064a6c048ab420302cbb822bedd3fc365b4259a7 (patch) | |
tree | 1aa6ee2716f2cc30e74dd97818330a5e2d154a07 /runtime/js/40_fs_events.js | |
parent | 745333f073aba4c97e7d06c731063105493cde5a (diff) |
feat: Add warnings for more deprecated APIs (#21992)
Follow up to https://github.com/denoland/deno/pull/21939 that adds
deprecation warnings to more `Deno` APIs:
- `Deno.copy()`
- `Deno.iter()`
- `Deno.iterSync()`
- `new Deno.Buffer()`
- `Deno.readAll()`
- `Deno.readAllSync()`
- `Deno.writeAll()`
- `Deno.writeAllSync()`
- `Deno.FsWatcher.return`
- `Deno.serveHttp()`
- `Deno.metrics()`
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'runtime/js/40_fs_events.js')
-rw-r--r-- | runtime/js/40_fs_events.js | 6 |
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 }); } |