logdna / logdna-browser

A frontend browser logging and exception capturing library for LogDNA
MIT License
19 stars 14 forks source link

ContextT TS type does not allow README example #25

Open MasterOdin opened 2 years ago

MasterOdin commented 2 years ago

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: 'user@email.email',
  },
});

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?