rollbar / rollbar.js

Error tracking and logging from Javascript to Rollbar
https://docs.rollbar.com/docs/javascript
MIT License
571 stars 213 forks source link

Incorrect type when unsetting a person #1058

Closed srph closed 1 year ago

srph commented 1 year ago

Hi, I'm using rollbar@^2.25.2, and upon trying to unset a user like so:

const payload = { person: { id: null } }
rollbar.configure({ payload })

I'm getting this type error:

Type '{ person: { id: null; }; }' is not assignable to type 'Payload'.
  The types of 'person.id' are incompatible between these types.
    Type 'null' is not assignable to type 'string | number'.ts(2322)

The docs instruct otherwise:

image

Let me know if there's anything I may have missed. Thanks!

waltjones commented 1 year ago

Fix is released in v2.26.1. Thank you for the report.