API Reference
fromFSWatch()
fromFSWatch: Node.js filesystem watcher source.
External fs callbacks are a source boundary (R-no-raw-async): events enter the graph only via ctx.down, and cleanup is tied to node deactivation through ctx.onDeactivation.
Import
import { fromFSWatch } from "@graphrefly/ts/sources/node";
Signature
function fromFSWatch(
paths: string | readonly string[],
opts: FromFSWatchOptions = {},
): Operator<never, FSEvent>
Parameters
| Parameter | Type | Description |
|---|---|---|
paths | string | readonly string[] | paths value used by the helper. |
opts | FromFSWatchOptions | Options that configure the helper. |
Returns
A Operator<never, FSEvent> value for the boundary or adapter.
Example
import { fromFSWatch } from "@graphrefly/ts/sources/node";
Source
packages/ts/src/sources/node.ts