diff --git a/types/react-native-svg-charts/index.d.ts b/types/react-native-svg-charts/index.d.ts index 8581c4fd13..0dea6784f8 100644 --- a/types/react-native-svg-charts/index.d.ts +++ b/types/react-native-svg-charts/index.d.ts @@ -23,8 +23,10 @@ export type ScaleType = | ScalePower | ScaleTime; +export interface AccessorFunctionProps { index: number; item: T; } + export type ScaleFunction = () => ScaleType | ScaleBand; -export type AccessorFunction = (props: { item: T, index: number }) => U; +export type AccessorFunction = (props: AccessorFunctionProps) => U; export type SortFunction = (a: T, b: T) => number; export type OffsetFunction = (series: Series, order: number[]) => void; export type OrderFunction = (series: Series) => number[];