( uid: string, mode: string, mode2?: string, )
| 771 | } |
| 772 | |
| 773 | export async function getPersonalBests( |
| 774 | uid: string, |
| 775 | mode: string, |
| 776 | mode2?: string, |
| 777 | ): Promise<PersonalBest> { |
| 778 | const user = await getPartialUser(uid, "get personal bests", [ |
| 779 | "personalBests", |
| 780 | ]); |
| 781 | |
| 782 | if (mode2 !== undefined) { |
| 783 | // oxlint-disable-next-line no-unsafe-member-access |
| 784 | return user.personalBests?.[mode]?.[mode2] as PersonalBest; |
| 785 | } |
| 786 | |
| 787 | return user.personalBests?.[mode] as PersonalBest; |
| 788 | } |
| 789 | |
| 790 | export async function getStats( |
| 791 | uid: string, |
nothing calls this directly
no test coverage detected