Skip to content
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

Type issue: removeSubscription function has been removed from NativeEventEmitter, but its type is not updated #39111

Closed
Yupeng-li opened this issue Aug 22, 2023 · 4 comments
Labels
Bug Help Wanted :octocat: Issues ideal for external contributors. Typescript

Comments

@Yupeng-li
Copy link

Yupeng-li commented Aug 22, 2023

Description

removeSubscription(subscription: EmitterSubscription): void; has been removed from NativeEventEmitter in this commit. However, the type file is not updated.

React Native Version

0.71.12

Output of npx react-native info

System:
  OS: macOS 13.5.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 711.83 MB / 32.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 18.17.0 - ~/Library/Caches/fnm_multishells/24849_1670237417415/bin/node
  Yarn: 1.22.19 - /usr/local/bin/yarn
  npm: 9.6.7 - ~/Library/Caches/fnm_multishells/24849_1670237417415/bin/npm
  Watchman: 2023.06.26.00 - /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2021.2 AI-212.5712.43.2112.8609683
  Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
Languages:
  Java: 11.0.19 - /Users/yupeng/.sdkman/candidates/java/11.0.19-tem/bin/javac
npmPackages:
  @react-native-community/cli: Not Found
  react: 18.2.0 => 18.2.0
  react-native: 0.71.12 => 0.71.12
  react-native-macos: Not Found
npmGlobalPackages:
  *react-native*: Not Found

Steps to reproduce

The details are in the "Description" section above.

Snack, screenshot, or link to a repository

https://snack.expo.dev/@yupeng_li/nativeeventemitter-removesubscription

@github-actions
Copy link

⚠️ Add or Reformat Version Info
ℹ️ We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2

@Yupeng-li
Copy link
Author

⚠️ Add or Reformat Version Info
ℹ️ We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2

The version has been updated in the original issue report.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Aug 22, 2023
@cortinico cortinico added Help Wanted :octocat: Issues ideal for external contributors. Bug Typescript and removed Needs: Attention Issues where the author has responded to feedback. Needs: Version Info labels Aug 22, 2023
@cortinico
Copy link
Contributor

Thanks for the report @Yupeng-li
This is up for grab if someone wants to contribute to React Native

@Yupeng-li
Copy link
Author

@cortinico Thank you for the quick reply. I've created a pull request #39115 to fix it.

facebook-github-bot pushed a commit that referenced this issue Aug 22, 2023
…ter (#39115)

Summary:
Removed deprecated function removeSubscription from the type of NativeEventEmitter, so that it lines up with its implementation. This is a fix for #39111 .

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Fixed] - Fix a type issue of NativeEventEmitter

Pull Request resolved: #39115

Test Plan: Not applicable

Reviewed By: NickGerleman

Differential Revision: D48573676

Pulled By: lunaleaps

fbshipit-source-id: e70c951e230e0d236e0bf0a1ba02b450bdc98ac5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Help Wanted :octocat: Issues ideal for external contributors. Typescript
Projects
None yet
Development

No branches or pull requests

3 participants