react-native-macos/types/__typetests__
Nick Gerleman febf6b7f33 Constrain data type in `getItemLayout` callback (#36237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36237

This changes the data parameter type for `getItemLayout` from a mutable array (too lenient, even before), to `ArrayLike`, which is now the most constrained subset of data which may be passed to a FlatList.

We could do something more exact by adding another generic parameter to FlatList, but that would be likely be noticeably more breaking, since during testing I couldn't manage a pattern that both kept the same minimum number of generic arguments while keeping inference working.

Changelog:
[General][Breaking] - Constrain data type in `getItemLayout` callback

Reviewed By: javache

Differential Revision: D43466967

fbshipit-source-id: 7a1ce717e7d5cc96a58b8d3ad9def6cf6250871f
2023-02-24 16:19:14 -08:00
..
animated.tsx Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
fabric-component-sample.ts Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
globals.tsx Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
index.tsx Constrain data type in `getItemLayout` callback (#36237) 2023-02-24 16:19:14 -08:00
init-example.tsx Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
legacy-properties.tsx Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
stylesheet-create.tsx Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
stylesheet-flatten.tsx Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
turbo-module-sample.ts Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00