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

    Type Alias KeyColumnForSchema<S>

    KeyColumnForSchema: KeyColumnForKind<S[0]["kind"]>

    Public column type for a schema's key column, narrowed by the first-column kind. Mirrors PublicColumnForKind on the value side. Used by the schema-narrowed TimeSeries.keyColumn() signature (RFC §7.5) so a time-keyed series returns TimeKeyColumn, an interval-keyed series returns IntervalKeyColumn, etc., without a cast at the consumer site.

    Implemented in two steps so the inner conditional distributes over the kind union — S[0]['kind'] is a union for a broad S like SeriesSchema, and a non-naked conditional check would collapse to never rather than producing the matching key-column union. The KeyColumnForKind<K> helper takes K as a naked type parameter so distribution applies; a TimeSeries<SeriesSchema>.keyColumn() then types as TimeKeyColumn | TimeRangeKeyColumn | IntervalKeyColumn as expected. Closes Codex finding on PR #159.

    Why a single concrete class per kind (no chunked variant)? Key columns are never chunked in the substrate — ColumnarStore's key column is the single source of truth for row ordering, and chunked storage shows up only on the value side (typically post- concatSorted). If chunked keys ever land they'll widen this type the same way PublicColumnForKind widens for values.

    Type Parameters