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

ContextT TS type does not allow README example #25

Open
MasterOdin opened this issue Jan 27, 2022 · 0 comments
Open

ContextT TS type does not allow README example #25

MasterOdin opened this issue Jan 27, 2022 · 0 comments

Comments

@MasterOdin
Copy link

MasterOdin commented Jan 27, 2022

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?

@MasterOdin MasterOdin changed the title ContextT type does not allow README example ContextT TS type does not allow README example Jan 27, 2022
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

1 participant