mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: `Promise<T>` is used very often in turbo module as function return types. So `T` is a critical thing for type safety. To enable future generator to produce more specific type for `Promise`, `T` is added to the schema. ## Changelog [General] [Changed] - Fix codegen to add `T` of `Promise<T>` in CodegenSchema.js Pull Request resolved: https://github.com/facebook/react-native/pull/35345 Test Plan: `yarn jest react-native-codegen` passed Reviewed By: lunaleaps Differential Revision: D41304647 Pulled By: cipolleschi fbshipit-source-id: 6cdd2357b83d4d8007c881a7090cbb8969f3ae9d
@react-native/codegen
Installation
yarn add --dev @react-native/codegen
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the react Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest react-native-codegen.