-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
React-native 59 has getItemLayout typing
getItemLayout?: ((data: SectionListData<any>[] | null, index: number) => {
length: number;
offset: number;
index: number;
}) | undefinedLibrary type
export type SectionListDataProp = Array<{
title: string
data: any[]
}>Type error
Type '(data: { title: string; data: any[]; }[], index: number) => { length: number; offset: number; index: number; }' is not assignable to type '(data: SectionListData<any>[] | null, index: number) => { length: number; offset: number; index: number; }'.
Types of parameters 'data' and 'data' are incompatible.
Type 'SectionListData<any>[] | null' is not assignable to type '{ title: string; data: any[]; }[]'.
Type 'null' is not assignable to type '{ title: string; data: any[]; }[]'.
It looks like the types for data are no longer compatible.
antoinerousseau
Metadata
Metadata
Assignees
Labels
No labels