firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

Fix types for setUserId

Open elliotdickison opened this issue 2 years ago • 2 comments

The types for setUserId in the analytics service module do not allow for passing null, which is the recommended way for clearing out the user id: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics#public-void-setuserid-string-id

I updated the types and related documentation to allow null to be passed and added a test. The underlying setUserId function in the analytics functions module already allows for null, so this shouldn't result in any behavioral changes.

elliotdickison avatar Jun 20 '22 23:06 elliotdickison

🦋 Changeset detected

Latest commit: df892706357831b087c986ba782d8d23e12c930a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@firebase/analytics Patch
@firebase/analytics-compat Patch
@firebase/analytics-types Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jun 20 '22 23:06 changeset-bot[bot]

I believe this change is still valid...

elliotdickison avatar Mar 22 '24 04:03 elliotdickison