Skip to content

Commit

Permalink
Merge pull request #491 from Iterable/evan/MOB-6063-update-setEmail-s…
Browse files Browse the repository at this point in the history
…etUserId-parameter-types

[MOB-6063] updates parameter types for setEmail and setUserId
  • Loading branch information
evantk91 committed Jun 28, 2023
2 parents d95c6d3 + dba2b0c commit 0daebe5
Showing 1 changed file with 6 additions and 6 deletions.
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) {
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) {
static setUserId(userId?: string | null, authToken?: string | null) {
Iterable.logger.log("setUserId: " + userId)

RNIterableAPI.setUserId(userId, authToken)
Expand Down

0 comments on commit 0daebe5

Please sign in to comment.