MindscapeHQ / raygun4js

JavaScript provider for Raygun
https://raygun.com
Other
149 stars 60 forks source link

`rg4js('boot')` not just for React Native #458

Closed mcfarljw closed 2 years ago

mcfarljw commented 2 years ago
rg4js('boot'); // For React Native only: add this after all other config options have been called

It's a bit confused from the docs which imply that rg4js('boot') is only required with React Native apps. I have an Ionic Capacitor app and errors don't send unless I call the boot action.

As a bonus it's also be great to get the typing updates as they don't currently include the boot parameter which requires doing rg4js('boot' as any) for TypeScript to compile. Here is the link to the current typings: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/raygun4js

Widdershin commented 2 years ago

Hi @mcfarljw,

Thanks for the issue. Sorry about any confusion around this behaviour.

The current plan is to fix the underlying issue that requires calling 'boot' manually, which I've opened #454 to track. That should hopefully be a smoother experience for users.

mcfarljw commented 2 years ago

Thanks I've subscribed to that issue instead.

Codex- commented 2 years ago

To address the 'boot' as any issue I have raised a PR here: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/61397

This simply adds the API: (key: "boot"): void;

Codex- commented 2 years ago

The typings PR has been merged and released :)