Type alias ValueAccessor<T>

ValueAccessor<T>: string | ((row) => unknown)

Where an aggregation gets its value from a row: a property path ("total", "address.city") or a function (computed values, numbers stored as text, …).

Type Parameters

  • T = any

    the row type

Type declaration

    • (row): unknown
    • Parameters

      • row: T

      Returns unknown

Example

const byPath: ValueAccessor<Order> = "total";
const computed: ValueAccessor<Order> = order => order.quantity * order.price;

Since

1.1.94