@pond-ts/process API Reference
    Preparing search index...

    Interface GraphSource<S>

    What fromLive needs from a pond live source: enough to materialize a snapshot, and a way to hear that one is due.

    Looser than core's LiveSource<S> in exactly one place — the 'event' listener's parameter is any. That is not laziness: this package never reads the event, it only needs the notification, and core's incremental operators type that listener differently. LiveAggregation.on('event', …) hands back a widened ClosedEvent rather than a schema-narrowed EventForSchema<Out>, so it does not satisfy LiveSource<Out> structurally. Requiring the exact interface would reject precisely the sources worth binding (see fromLive).

    LiveSeries, LiveView, LiveAggregation, LiveRollingAggregation, and LiveFusedRolling all match this.

    interface GraphSource<S extends SeriesSchema> {
        length: number;
        name: string;
        schema: S;
        at(index: number): EventForSchema<S> | undefined;
        on(type: "event", fn: (event: any) => void): () => void;
    }

    Type Parameters

    • S extends SeriesSchema

    Hierarchy (View Summary)

    Index

    Properties

    Methods

    Properties

    length: number
    name: string
    schema: S

    Methods