-
Notifications
You must be signed in to change notification settings - Fork 253
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
React Navigation Plugin in TypeScript #1481
Comments
Hi @henrymoulton, The best way to work around this would be by adding a ! at the end of the line so it becomes: We are considering making some Typescript specific changes to the docs to better clarify this and I'll let you know of updates on that. |
Thanks @johnkiely1 that's not an ideal workaround I think for now I'm going to avoid Bugsnag plugins and just replicate the functionality. Feedback is: I'm a big fan of your SDK and bring it to every client I can, but just feel like the docs/work around plugins (at least for React Native) doesn't feel like it has the polish of other React Native specific things that you guys support e.g. CodePush. Another example but separate issue is Jest Mocking / TypeScript support for the the
Obviously separate issue but just wanted to illustrate that it feels like plugins could be super useful but lack a bit of love. Don't worry my love for Bugsnag endures ❤️ |
👋. Just wanted to clarify why this workaround is the right thing to do. There's two scenarios that can occur:
So, whilst the addition of A simple method for guarding against the error boundary plugin (for example) was discussed here, although this was under a slightly different context, the same method can be applied), the point being, if you guard against this and start to see plugins Hope this helps solve your issue and allow you to continue using the Bugsnag plugins :) |
@xander-jones sorry for dropping this - great explanation. |
@xander-jones going to continue discussion in #1112. |
Description
When installing the React Navigation plugin in a TypeScript project it fails to typecheck
const { createNavigationContainer } = Bugsnag.getPlugin('reactNavigation')
Describe the solution you'd like
Better typings in the package or some docs on how to workaround
https://docs.bugsnag.com/platforms/react-native/react-native/navigation-libraries/
https://github.com/bugsnag/bugsnag-js/blob/next/packages/plugin-react-navigation/react-navigation.js
The text was updated successfully, but these errors were encountered: