Commit 3e24033
Add missing strictMode prop to FlatList TypeScript types (#57674)
Summary:
FlatList's `strictMode` prop is implemented in the component and declared in the Flow types (OptionalFlatListProps in FlatList.js), but missing from the shipped TypeScript definitions. TS users can't set it on <FlatList> without augmenting the module themselves. This adds `strictMode?: boolean` to the TypeScript FlatListProps, matching the Flow declaration. Types-only, no runtime change.
## Changelog:
[GENERAL] [ADDED] - Add missing strictMode prop to FlatList TypeScript types
Pull Request resolved: #57674
Test Plan:
Types-only change:
- Before, `<FlatList ... strictMode />` errored `(Property 'strictMode' does not exist);`
- After, it type-checks. Matches the Flow prop and the runtime use in `render(): const renderer = strictMode ? this._memoizedRenderer : this._renderer;`
Reviewed By: cortinico
Differential Revision: D113631325
Pulled By: Abbondanzo
fbshipit-source-id: 84866649daec3385b564e4c13f139aea0a787b371 parent 6d0612c commit 3e24033
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
0 commit comments