-
Notifications
You must be signed in to change notification settings - Fork 240
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
[BUG] Type 'ReactNativePlugin' is not assignable to type 'ITelemetryPlugin' #1324
Comments
This issue is a method signature issue only, as a workaround you should be able and can safely cast the plugin to an ITelemetryPlugin when assigning the react-native to the extensions. The ITelemetryPluginChain property is only used if you are creating a shared instance and reusing across multiple AI instances. |
thanks! the workaround seems to do the trick. Is there a plan to fix this in the future releases? |
Yep, about to start working on it now -- should be in next release |
thank you! |
PR is out -- please have a look as I've applied a couple of changes, specifically
|
Fully Deployed to CDN and NPM as version 2.5.7 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description/Screenshot
Type 'ReactNativePlugin' is not assignable to type 'ITelemetryPlugin'.
Types of property 'setNextPlugin' are incompatible.
Type '(next: ITelemetryPlugin) => void' is not assignable to type '(next: ITelemetryPlugin | ITelemetryPluginChain) => void'.
Types of parameters 'next' and 'next' are incompatible.
Type 'ITelemetryPlugin | ITelemetryPluginChain' is not assignable to type 'ITelemetryPlugin'.
Type 'ITelemetryPluginChain' is missing the following properties from type 'ITelemetryPlugin': priority, initialize, identifier
Steps to Reproduce
When I add the latest versions of applicationinsights-react-native and applicationinsights-web, I get the above error while trying to create a new instance of ApplicationInsights().
ReactNativePlugin is not accepted as a valid value for extensions array.
yarn add @microsoft/applicationinsights-react-native
yarn add @microsoft/applicationinsights-web
Versions installed are,
"@microsoft/applicationinsights-react-native": "^2.2.5",
"@microsoft/applicationinsights-web": "^2.5.6",
Expected behavior
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: