logdna-browser icon indicating copy to clipboard operation
logdna-browser copied to clipboard

ContextT TS type does not allow README example

Open MasterOdin opened this issue 4 years ago • 0 comments

The README has the following example for setContext:

logdna.addContext({
  // Add any custom metadata such as:
  version: 'v1.0.2',
  sessionReplay: 'http://mySessionReplayTool/',
  user: {
    email: '[email protected]',
  },
});

user throws an error as the ContextT object is typed as { [key: string]: string }. Should it be { [key: string]: string | { [key: string]: string } or does it not allow some amount of recursion here on objects?

MasterOdin avatar Jan 27 '22 17:01 MasterOdin