Skip to content

Commit

Permalink
all: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-roland committed Nov 12, 2024
1 parent d17a543 commit 494735e
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions src/modules/profile/profileAttributeEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,41 +96,41 @@ export class BatchProfileAttributeEditor
return this;
}

public setPhoneNumber(phoneNumber: string | null): this {
if (typeof phoneNumber !== "string" && phoneNumber !== null) {
writeBatchLog(
false,
"BatchProfileAttributeEditor - Phone number must be a string or null"
);
return this;
}
this._enqueueOperation(ProfileAttributeOperation.SetPhoneNumber, {
value: phoneNumber,
});
return this;
public setPhoneNumber(phoneNumber: string | null): this {
if (typeof phoneNumber !== "string" && phoneNumber !== null) {
writeBatchLog(
false,
"BatchProfileAttributeEditor - Phone number must be a string or null"
);
return this;
}
this._enqueueOperation(ProfileAttributeOperation.SetPhoneNumber, {
value: phoneNumber,
});
return this;
}

public setSMSMarketingSubscription(
state: "subscribed" | "unsubscribed"
): this {
if (
typeof state !== "string" ||
(state !== "subscribed" && state !== "unsubscribed")
) {
writeBatchLog(
false,
"BatchProfileAttributeEditor - SMS marketing subscription state must be `subscribed` or `unsubscribed`."
);
return this;
}
this._enqueueOperation(
ProfileAttributeOperation.SetSMSMarketingSubscription,
{
value: state,
}
);
return this;
public setSMSMarketingSubscription(
state: "subscribed" | "unsubscribed"
): this {
if (
typeof state !== "string" ||
(state !== "subscribed" && state !== "unsubscribed")
) {
writeBatchLog(
false,
"BatchProfileAttributeEditor - SMS marketing subscription state must be `subscribed` or `unsubscribed`."
);
return this;
}
this._enqueueOperation(
ProfileAttributeOperation.SetSMSMarketingSubscription,
{
value: state,
}
);
return this;
}

public setAttribute(
key: string,
Expand Down

0 comments on commit 494735e

Please sign in to comment.