SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Add @types/react as optional peerDependency on packages that use it (#43509)

Summary:
Now that RN is providing TS type information, many of those .d.ts files depend on types from react.  In modern packagemanagers (Ex: pnpm) types/react will not be available to RN since it does not declare it as a dependency.

I also noticed that the types for react-native-popup-menu-android appear to be pointing to the wrong location.

Add types/react as a peerDependency on the packages that have .d.ts files that import from React.
Add types/react to peerDependencyMeta with optional:true to prevent users not using TS from requiring types/react.

## Changelog:

[GENERAL] [ADDED] Added types/react as an optional peerDependency

Pull Request resolved: https://github.com/facebook/react-native/pull/43509

Reviewed By: cortinico

Differential Revision: D55225940

Pulled By: NickGerleman

fbshipit-source-id: 4cbab071928cb925baec45f55461559acc9a54e6
A
Andrew Coates committed
dbf8e3f5ba8636560898803f5c5973432bf61d1e
Parent: 8a2cf68
Committed by Facebook GitHub Bot <[email protected]> on 3/25/2024, 7:23:16 PM