From ce4d7e5d52cb0c23779616e5bc28f1ac8445cfff Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Mon, 12 May 2025 04:53:20 -0700 Subject: [PATCH] Fix generated types in @react-native/virtualized-lists being used without opt-in (#51246) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51246 Changelog: [General][Fixed] Fix generated types in react-native/virtualized-lists being used without opt-in D71969602 introduces `exports` field to `package.json` files in `react-native` and `virtualized-lists`. In that diff, the `types` in `virtualized-lists` by default pointed to the new generated types without requiring the opt-in. This fixes that by requiring the opt-in before using the generated types. Reviewed By: huntie Differential Revision: D74573321 fbshipit-source-id: fe05b0204a7200c1c91aac2614aa786bbbced2a5 --- packages/virtualized-lists/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index 80651d675e8..06d7cd82f22 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -21,7 +21,8 @@ }, "exports": { ".": { - "types": "./types_generated/index.d.ts", + "react-native-strict-api": "./types_generated/index.d.ts", + "types": "./index.d.ts", "default": "./index.js" }, "./*": {