Skip to content

Commit 607d333

Browse files
chore(backend): Add jsdoc comments for user methods (#6091)
Co-authored-by: panteliselef <[email protected]>
1 parent df9d415 commit 607d333

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.changeset/mean-apes-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/backend': patch
3+
---
4+
5+
Add JSdoc comments for user methods.

packages/backend/src/api/resources/User.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,30 @@ export class User {
185185
return res;
186186
}
187187

188+
/**
189+
* The primary email address of the user.
190+
*/
188191
get primaryEmailAddress() {
189192
return this.emailAddresses.find(({ id }) => id === this.primaryEmailAddressId) ?? null;
190193
}
191194

195+
/**
196+
* The primary phone number of the user.
197+
*/
192198
get primaryPhoneNumber() {
193199
return this.phoneNumbers.find(({ id }) => id === this.primaryPhoneNumberId) ?? null;
194200
}
195201

202+
/**
203+
* The primary web3 wallet of the user.
204+
*/
196205
get primaryWeb3Wallet() {
197206
return this.web3Wallets.find(({ id }) => id === this.primaryWeb3WalletId) ?? null;
198207
}
199208

209+
/**
210+
* The full name of the user.
211+
*/
200212
get fullName() {
201213
return [this.firstName, this.lastName].join(' ').trim() || null;
202214
}

0 commit comments

Comments
 (0)