Skip to content
PACKAGES

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 { fromFSWatch } from "@graphrefly/ts/sources/node";
function fromFSWatch(
paths: string | readonly string[],
opts: FromFSWatchOptions = {},
): Operator<never, FSEvent>
ParameterTypeDescription
pathsstring | readonly string[]paths value used by the helper.
optsFromFSWatchOptionsOptions that configure the helper.

A Operator<never, FSEvent> value for the boundary or adapter.

import { fromFSWatch } from "@graphrefly/ts/sources/node";

packages/ts/src/sources/node.ts