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

[BUG]: TS error using reactPlugin as an extension in new ApplicationInsights #2103

Closed
karolis-666 opened this issue Jul 17, 2023 · 5 comments

Comments

@karolis-666
Copy link

Description/Screenshot
After upgrading packages @microsoft/applicationinsights-react-js and @microsoft/applicationinsights-web to newest an TS error occurred:

image

Steps to Reproduce

Expected behavior

  • No TS error

Additional context
Code was made following docs as shown here https://learn.microsoft.com/en-us/azure/azure-monitor/app/javascript-framework-extensions?tabs=react

@MSNev
Copy link
Collaborator

MSNev commented Jul 17, 2023

Which versions of the components are you using?

  • React Plugin
  • Application Insights
  • TypeScript

See also React Plugin Issue 32

@karolis-666
Copy link
Author

"typescript": "^4.9.5",
"@microsoft/applicationinsights-react-js": "^3.4.3",
"@microsoft/applicationinsights-web": "^3.0.2",

Upgrading typescript to v5 has no impact on the issue

@MSNev
Copy link
Collaborator

MSNev commented Jul 18, 2023

Yeh, this issue is because v3.4.3 is not (TypeScript) compatible with v3.0.2 -- Yet

See Compatibility Matrix

And yes, we would not expect TS 5.x to make any difference, the basic issue is that AI 3.x changed the interface typings (which is what TypeScript is complaining about) -- but at runtime they are compatible, well this specific one at least.

See v3.x Breaking Changes

@MSNev
Copy link
Collaborator

MSNev commented Jul 24, 2023

An updated version of the React Plugin has now been published -- closing

@MSNev MSNev closed this as completed Jul 24, 2023
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants