Skip to main content
FSWatcher.addListener - node__fs.d.ts - Node documentation
method FSWatcher.addListener

Usage in Deno

```typescript import { type FSWatcher } from "node:node__fs.d.ts"; ```
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