You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is a bug in your TypeScript types and parentId shoud be nullable. I verified in the browser that the first time an operation starts its parent is set to undefined, so why can't I do the same? I specifically want to be able to set parentId to undefined for my purposes, since I track router changes myself.
The ITelemetryTrace interface says parentId should be string:
But TelemetryTrace (which implements ITelemetryTrace) allows setting it to undefined:
I think the compile failure would be because of your eslint config, by default we are only using
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended"
Having said that after looking at the code, I can't see any reason why this can't be optional
App Insights Browser (JS) SDK
I think this is a bug in your TypeScript types and parentId shoud be nullable. I verified in the browser that the first time an operation starts its parent is set to undefined, so why can't I do the same? I specifically want to be able to set parentId to undefined for my purposes, since I track router changes myself.
The ITelemetryTrace interface says parentId should be string:
But TelemetryTrace (which implements ITelemetryTrace) allows setting it to undefined:
Here's the ugly workaround I used:
(where parentId can be undefined)
The text was updated successfully, but these errors were encountered: