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

[MOB-6063] updates parameter types for setEmail and setUserId #491

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ts/Iterable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ class Iterable {
*
* Note: specify a user by calling Iterable.setEmail or Iterable.setUserId, but NOT both.
*
* @param {string | undefined} email email address to associate with the current user
* @param {string | undefined} authToken valid, pre-fecthed JWT the SDK can use to authenticate API requests, optional - if null/undefined, no JWT related action will be taken
* @param {string | null | undefined} email email address to associate with the current user
* @param {string | null | undefined} authToken valid, pre-fetched JWT the SDK can use to authenticate API requests, optional - if null/undefined, no JWT related action will be taken
*/

static setEmail(email: string | undefined, authToken?: string | undefined) {
static setEmail(email?: string | null, authToken?: string | null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The null and undefined changes will go here

Iterable.logger.log("setEmail: " + email)

RNIterableAPI.setEmail(email, authToken)
Expand Down Expand Up @@ -262,11 +262,11 @@ class Iterable {
*
* Note: specify a user by calling Iterable.setEmail or Iterable.setUserId, but NOT both.
*
* parameters: @param {string | undefined} userId user ID to associate with the current user
* optional parameter: @param {string | undefined} authToken valid, pre-fecthed JWT the SDK can use to authenticate API requests, optional - if null/undefined, no JWT related action will be taken
* parameters: @param {string | null | undefined} userId user ID to associate with the current user
* optional parameter: @param {string | null | undefined} authToken valid, pre-fetched JWT the SDK can use to authenticate API requests, optional - if null/undefined, no JWT related action will be taken
*/

static setUserId(userId: string | undefined, authToken?: string | undefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

static setUserId(userId?: string | null, authToken?: string | null) {
Iterable.logger.log("setUserId: " + userId)

RNIterableAPI.setUserId(userId, authToken)
Expand Down