Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.ns.d.ts>Deno.FsWatcher

A modern runtime for JavaScript and TypeScript.
Latest
interface Deno.FsWatcher
implements AsyncIterable<FsEvent>, Disposable
import { type Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.ns.d.ts";
const { FsWatcher } = Deno;

Returned by Deno.watchFs. It is an async iterator yielding up system events. To stop watching the file system by calling .close() method.

Methods

close(): void

Stops watching the file system and closes the watcher resource.

optional
return(value?: any): Promise<IteratorResult<FsEvent>>

Stops watching the file system and closes the watcher resource.

[[Symbol.asyncIterator]](): AsyncIterableIterator<FsEvent>