diff --git a/index.d.ts b/index.d.ts index 6e6c312..df4d713 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,11 @@ import * as React from "react"; -import { ViewStyle, ListRenderItemInfo, SectionListData, StyleProp } from "react-native"; +import { + ViewStyle, + ListRenderItemInfo, + SectionListRenderItemInfo, + SectionListData, + StyleProp +} from "react-native"; /** * React Native Super Grid Properties @@ -8,7 +14,7 @@ export interface FlatGridProps { /** * Function to render each object. Should return a react native component. */ - renderItem: (info: { item: ListRenderItemInfo }) => JSX.Element; + renderItem: (info: ListRenderItemInfo) => JSX.Element; /** * Items to be rendered. renderItem will be called with each item in this array. */ @@ -56,7 +62,7 @@ export interface FlatGridProps { * Optional callback ran by the internal `FlatList` or `SectionList`'s `onLayout` function, * thus invoked on mount and layout changes. */ - onLayout?: func; + onLayout?: Function; } /** @@ -67,15 +73,15 @@ export class FlatGrid extends React.Component< > {} export interface SectionGridProps { - renderItem: (info: { item: SectionListData }) => JSX.Element; - sections: ItemType, - itemDimension?: number, - fixed?: boolean, - spacing?: number, - style?: StyleProp, - staticDimension?: number, + renderItem: (info: SectionListRenderItemInfo) => JSX.Element; + sections: ItemType; + itemDimension?: number; + fixed?: boolean; + spacing?: number; + style?: StyleProp; + staticDimension?: number; renderSectionHeader?: (info: { section: SectionListData }) => JSX.Element; - onLayout?: func, + onLayout?: Function; } export class SuperGridSectionList extends React.Component<