import { BaseDatum } from '../chart_types/specs' ; param datum public export interface UnaryAccessorFn < D extends BaseDatum = any , Return = any > { /**
     * Name used as accessor field name in place of function reference
     */ fieldName ? : string ; ( datum ) : Return ; } param datum param index public export type BinaryAccessorFn < D extends BaseDatum = any , Return = any > = ( datum : D , index : number ) => Return ; public export type AccessorFn < D extends BaseDatum = any , Return = any > = UnaryAccessorFn < D , Return > ; public export type IndexedAccessorFn < D extends BaseDatum = any , Return = any > = UnaryAccessorFn < D , Return > | BinaryAccessorFn < D , Return > ; public export type AccessorObjectKey = string ; public export type AccessorArrayIndex = number ; public export type DatumKey < D extends BaseDatum > = D extends any [ ] ? number : Exclude < keyof D , symbol > | string ; public export type Accessor < D extends BaseDatum = never > = DatumKey < D > | AccessorObjectKey | AccessorArrayIndex ; public export type AccessorFormat = string | ( ( value : string ) => string ) ; param accessor internal export function getAccessorFn < D extends BaseDatum > ( accessor ) { return ( datum ) => typeof datum === 'object' && datum !== null ? datum [ accessor as keyof typeof datum ] : undefined ; } internal export function getAccessorFormatLabel ( accessor , label ) { if ( typeof accessor === 'string' ) { return `${ label }${ accessor }` ; } return accessor ( label ) ; } internal export function getAccessorValue < D extends BaseDatum > ( datum , accessor ) { if ( typeof accessor === 'function' ) { return accessor ( datum ) ; } try { return datum [ accessor ] ; } catch { return undefined ; } } public export type AdditiveNumber = number ;