From b0ac99b47781e3b68bee2ff737b109f58eeeba78 Mon Sep 17 00:00:00 2001 From: JDMathew Date: Thu, 3 Oct 2024 09:25:38 -0700 Subject: [PATCH] use unknown in Flatlist `setNativeProps` type for typescript >= 3.0 (#46773) Summary: While digging through the types I came accross this TODO. Now that react-native uses version 5 of TS this can be updated ## Changelog: [General] [Added] - Updated FlatList setNativeProps type Pull Request resolved: https://github.com/facebook/react-native/pull/46773 Reviewed By: NickGerleman Differential Revision: D63765333 Pulled By: cipolleschi fbshipit-source-id: ad612205d168cd90f270da72092f8ce67f5038c4 --- packages/react-native/Libraries/Lists/FlatList.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/Lists/FlatList.d.ts b/packages/react-native/Libraries/Lists/FlatList.d.ts index cdf51e25ae2..7ab68d87662 100644 --- a/packages/react-native/Libraries/Lists/FlatList.d.ts +++ b/packages/react-native/Libraries/Lists/FlatList.d.ts @@ -235,8 +235,7 @@ export abstract class FlatListComponent< getScrollableNode: () => any; - // TODO: use `unknown` instead of `any` for Typescript >= 3.0 - setNativeProps: (props: {[key: string]: any}) => void; + setNativeProps: (props: {[key: string]: unknown}) => void; } export class FlatList extends FlatListComponent<