Skip to content

Commit 17c989f

Browse files
imSzukalaclaude
andcommitted
fix: simplify loginUserWithUserAttributes type to UserAttributes
Address PR review feedback: the union type enforcing email|userId at compile time is unnecessary since the native layer validates at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 072f8b6 commit 17c989f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ export type IntercomType = {
101101
* Valid identifiers are `userId` and `email` which must be set in the {@link UserAttributes} object.
102102
* @param params The {@link UserAttributes} object that contains the user's `email` or `userId`.
103103
*/
104-
loginUserWithUserAttributes: (
105-
params: UserAttributes & ({ email: string } | { userId: string })
106-
) => Promise<boolean>;
104+
loginUserWithUserAttributes: (params: UserAttributes) => Promise<boolean>;
107105

108106
/**
109107
* Log a user out of their Intercom session.

0 commit comments

Comments
 (0)