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

v1.13.0 Error with older typescript version -- node_modules/tslib/tslib.d.ts(37,78): error TS2304: Cannot find name 'PropertyKey'. (When targeting es3) #115

Open
MSNev opened this issue May 18, 2020 · 3 comments

Comments

@MSNev
Copy link

MSNev commented May 18, 2020

Hi,

We are from the ApplicationInsights team and on updating the npm package to 1.13.0 we are now getting this error.
We are currently using ts v2.5.3 and as of today we cannot update to a later version because of issues with teams that consume our generated code.

Compiling...
Using tsc v2.5.3
common/temp/node_modules/tslib/tslib.d.ts(37,78): error TS2304: Cannot find name 'PropertyKey'.
common/temp/node_modules/tslib/tslib.d.ts(37,103): error TS2304: Cannot find name 'PropertyKey'.

@MSNev
Copy link
Author

MSNev commented May 27, 2020

The issue is that for backward compatibility we are targeting "es3" to ensure that we don't introduce breaking changes that cause consumers of the App Insights SDK which happen to load in an ES3 environment to completely fail.

@MSNev MSNev changed the title v1.13.0 Error with older typescript version -- node_modules/tslib/tslib.d.ts(37,78): error TS2304: Cannot find name 'PropertyKey'. v1.13.0 Error with older typescript version -- node_modules/tslib/tslib.d.ts(37,78): error TS2304: Cannot find name 'PropertyKey'. (When targeting es3) May 27, 2020
@MSNev
Copy link
Author

MSNev commented Jul 2, 2020

We have temporarily worked around this by creating our own "applicationinsights-shims" module which provides the needed __assign() and __extends() implementations, however, this requires our consumers to also include this module or if using webpack to use the ProviderPlug() to inject the implementations from tslib or the shims module.

We would however, like to get back of the train rather than keeping our workaround and it's constraints

@nicolashenry
Copy link

@MSNev Note that I think "es3" users could set "skipLibCheck": true (this value is the default when using tsc --init) in their tsconfig.json to make it work.

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

No branches or pull requests

2 participants