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

[main][doc] add document for how to fix type error in extensions #2395

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

siyuniu-ms
Copy link
Contributor


## Reason

When a new version of applicationinsights-web (which includes applicationinsights-core as a dependency) is released, package management tools may automatically update applicationinsights-core to the new version. However, if the extensions (e.g., React, Angular) have not been updated, their dependencies on applicationinsights-core may not match, leading to type errors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to call out here that this is a TypeScript issue only as we work really hard to ensure that while the "types" (might) appear different to different versions of TypeScript at runtime the code should still interoperate as long as the "core" version is later than any sub-component as we support backward compatibility but not forward compatibility.

Which means we support older components working with "newer" dependencies (ie the newer dependency is backward compatible for older components) but not newer components working with "older" dependencies.

A good example of this is that we may from time to time "add" new public helper functions to core components that some "newer" extensions might use / need. As such that "newer" function is only available in the "newer" version of the core component and not in the older previous published components. (ie. we don't know now (or back then) what functions we "might" need in a future release -- why I call it forward compatibility)

```
### 3. Examples to follow
Here is a discussion that provide deeper insights into resolving these issues:
https://github.com/microsoft/applicationinsights-react-js/issues/95
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a new TypeScript flag (which most people wont use) -

  • skipLibCheck
  • noCheck
    I thought I read recently (somewhere) that there was a new config but I can't find it currently

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Will check that potential walk around before merge this pr.

@siyuniu-ms siyuniu-ms merged commit 883fee6 into main Sep 20, 2024
6 of 7 checks passed
@siyuniu-ms siyuniu-ms deleted the siyu/typeReadme branch September 20, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants