@leanchuck/core - v0.1.1
    Preparing search index...

    Type Alias KeyAccessor<T>

    KeyAccessor: keyof T | ((item: T) => string | number)

    Resolves to a grouping key for a given item. Either the key of a property, or a function that derives the key. Returned values are coerced to strings when used for grouping.

    Type Parameters

    • T
    const byCustomer: KeyAccessor<Row> = 'customer';
    const byRegion: KeyAccessor<Row> = (r) => `${r.country}/${r.state}`;