Skip to main content
FSWatcher.on - fs - Node documentation
method FSWatcher.on

Usage in Deno

import { type FSWatcher } from "node:fs";
FSWatcher.on(
event: string,
listener: (...args: any[]) => void,
): this

Parameters

event: string
listener: (...args: any[]) => void

Return Type

this
FSWatcher.on(
event: "change",
listener: (
eventType: string,
filename: string | Buffer,
) => void
,
): this

Parameters

event: "change"
listener: (
eventType: string,
filename: string | Buffer,
) => void

Return Type

this
FSWatcher.on(
event: "close",
listener: () => void,
): this

Parameters

event: "close"
listener: () => void

Return Type

this
FSWatcher.on(
event: "error",
listener: (error: Error) => void,
): this

Parameters

event: "error"
listener: (error: Error) => void

Return Type

this
Back to top