interval()
Emit periodic tick counters.
Import
Section titled “Import”import { interval } from "@graphrefly/ts/sources";Signature
Section titled “Signature”function interval(ms: number): Operator<never, number>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ms | number | Delay before the first tick and between later ticks in milliseconds. |
Returns
Section titled “Returns”A source operator that emits 0, 1, 2, and so on.
Example
Section titled “Example”import { graph } from "@graphrefly/ts/graph";import { interval } from "@graphrefly/ts/sources";
const ticks = graph().initNode(interval(1000), []);Source
Section titled “Source”packages/ts/src/graph/sources.ts