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)
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'.
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.
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
@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.