FSWatcher.addListener - Node documentation
method FSWatcher.addListener

Usage in Deno

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

events.EventEmitter

  1. change
  2. close
  3. error

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this