Skip to content
PACKAGES

interval()

Emit periodic tick counters.

import { interval } from "@graphrefly/ts/sources";
function interval(ms: number): Operator<never, number>
ParameterTypeDescription
msnumberDelay before the first tick and between later ticks in milliseconds.

A source operator that emits 0, 1, 2, and so on.

import { graph } from "@graphrefly/ts/graph";
import { interval } from "@graphrefly/ts/sources";
const ticks = graph().initNode(interval(1000), []);

packages/ts/src/graph/sources.ts