diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-09-17 07:57:53 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 07:57:53 +1000 |
commit | 51d926ac30413a6747505b3f248f43a563470545 (patch) | |
tree | d44723e47ccfe8a6a386f910079aca88f1bb3cf9 | |
parent | 8fe90d286160d6cc585e18b1a2f4e29bd1523852 (diff) |
chore(fs): undeprecate `Deno.FsWatcher.prototype.return()` (#25623)
-rw-r--r-- | cli/tsc/dts/lib.deno.ns.d.ts | 4 | ||||
-rw-r--r-- | runtime/js/40_fs_events.js | 3 | ||||
-rw-r--r-- | tests/unit/fs_events_test.ts | 2 |
3 files changed, 0 insertions, 9 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index d27fc380d..f44bf9a02 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -3484,10 +3484,6 @@ declare namespace Deno { close(): void; /** * Stops watching the file system and closes the watcher resource. - * - * @deprecated This will be removed in Deno 2.0. See the - * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide} - * for migration instructions. */ return?(value?: any): Promise<IteratorResult<FsEvent>>; [Symbol.asyncIterator](): AsyncIterableIterator<FsEvent>; diff --git a/runtime/js/40_fs_events.js b/runtime/js/40_fs_events.js index a1c40c5e5..c20f9ed23 100644 --- a/runtime/js/40_fs_events.js +++ b/runtime/js/40_fs_events.js @@ -49,10 +49,7 @@ 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 }); } diff --git a/tests/unit/fs_events_test.ts b/tests/unit/fs_events_test.ts index 148688215..cc2f2cd57 100644 --- a/tests/unit/fs_events_test.ts +++ b/tests/unit/fs_events_test.ts @@ -90,8 +90,6 @@ Deno.test( }, ); -// TODO(kt3k): This test is for the backward compatibility of `.return` method. -// This should be removed at 2.0 Deno.test( { permissions: { read: true, write: true } }, async function watchFsReturn() { |