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

    Type Alias SnapshotSource<S>

    Structural type covering all pond-ts live objects (LiveSeries, LiveView, LiveAggregation, LiveRollingAggregation).

    Using a structural type instead of the nominal LiveSource<S> avoids casts when passing LiveAggregation (whose output schema differs from its input type parameter).

    type SnapshotSource<S extends SeriesSchema = SeriesSchema> = {
        length: number;
        name: string;
        schema: S;
        at(index: number): unknown;
        on(type: "event", fn: (...args: any[]) => void): () => void;
    }

    Type Parameters

    • S extends SeriesSchema = SeriesSchema
    Index

    Properties

    Methods

    Properties

    length: number
    name: string
    schema: S

    Methods

    • Parameters

      • type: "event"
      • fn: (...args: any[]) => void

      Returns () => void