-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @types/react as optional peerDependency on packages that use it #43509
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
p: Microsoft
Partner: Microsoft
Partner
labels
Mar 15, 2024
|
facebook-github-bot
added
the
Shared with Meta
Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
label
Mar 15, 2024
Base commit: 1021448 |
Comment on lines
+10
to
+11
export type {default} from './js/PopupMenuAndroid'; | ||
export type {PopupMenuAndroidInstance} from './js/PopupMenuAndroid'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! FYI @RSNara
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@NickGerleman merged this pull request in dbf8e3f. |
huntie
pushed a commit
that referenced
this pull request
Apr 2, 2024
…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. [GENERAL] [ADDED] Added types/react as an optional peerDependency Pull Request resolved: #43509 Reviewed By: cortinico Differential Revision: D55225940 Pulled By: NickGerleman fbshipit-source-id: 4cbab071928cb925baec45f55461559acc9a54e6
This was referenced Apr 5, 2024
This was referenced Jun 28, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Merged
This PR has been merged.
p: Microsoft
Partner: Microsoft
Partner
Shared with Meta
Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Summary:
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