From 2cb1f8e4e3bb6ea8bf333bbf3f3a7639092c8941 Mon Sep 17 00:00:00 2001 From: Aswin Andro Date: Thu, 12 Jun 2025 14:28:14 -0700 Subject: [PATCH] Publish top-level Flow types for `react-native` (#51908) Summary: FIXED Add index.js.flow to npm package files for Flow support Currently, the distributed npm package for react-native does not include the index.js.flow file, which causes all exports to be typed as any when using Flow. This commit adds index.js.flow to the "files" array in package.json, ensuring Flow users receive proper type definitions out of the box. This addresses issues where type checking with Flow fails in React Native projects. ## Changelog: [General][Added] Publish top-level Flow types for `react-native` Pull Request resolved: https://github.com/facebook/react-native/pull/51908 Reviewed By: huntie, necolas Differential Revision: D76292301 Pulled By: robhogan fbshipit-source-id: e56360d3f35af30ef160470181349aac1812e7c1 --- packages/react-native/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 81c66c0f42d..d9b4178eef0 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -82,6 +82,7 @@ "gradle.properties", "gradle/libs.versions.toml", "index.js", + "index.flow.js", "interface.js", "jest-preset.js", "jest",