pond-ts API Reference (core)
    Preparing search index...

    Class Sequence

    An unbounded fixed-step grid definition used for alignment or aggregation.

    Sequence defines where buckets fall. Call bounded(...) to realize a finite BoundedSequence over a specific range.

    Important distinction:

    • the sequence anchor defines where the unbounded grid starts
    • the caller-supplied range defines which finite slice is realized

    The default anchor is Unix epoch 0.

    Index

    Constructors

    Methods

    • Example: sequence.bounded(new TimeRange({ start, end })). Realizes a finite BoundedSequence over the supplied range.

      Sample position controls which intervals are selected:

      • 'begin' (default) — sample point is the interval's start. Includes buckets where sample ∈ [range.begin, range.end].
      • 'center' — sample point is the interval's midpoint. Same inclusive range as 'begin'.
      • 'end' — sample point is the interval's exclusive end (i.e. the start of the next bucket). Inclusion is left-exclusive: sample ∈ (range.begin, range.end]. This keeps the boundary case symmetric — an end-sample at exactly range.begin() would otherwise pull in an interval whose extent sits entirely before the range.

      Parameters

      Returns BoundedSequence

    • Example: sequence.kind(). Returns whether this sequence is fixed-step or calendar-aware.

      Returns "fixed" | "calendar"

    • Example: sequence.timeZone(). Returns the IANA time zone for calendar-aware sequences, if any.

      Returns string | undefined

    • Creates an unbounded fixed-step sequence.

      The returned sequence is a grid definition, not a finite bucket list. By default the grid is anchored at Unix epoch 0, which makes independently-created sequences line up by default. Use bounded(...) or series operations like align(...) / aggregate(...) to realize a finite slice of the grid over a concrete range.

      Parameters

      Returns Sequence