UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

23 lines (22 loc) 655 B
import { UserInfo as AuthUserInfo } from '@firebase/auth-types'; import { Nil } from '../../utils/misc'; /** * Converts complete Firebase UserInfo to plain object with properties */ export declare const getUserInfo: (user: AuthUserInfo) => { displayName: string | null; email: string | null; phoneNumber: string | null; photoURL: string | null; providerId: string; uid: string; }; export type UserInfo = ReturnType<typeof getUserInfo>; /** * Converts user object to displayable name */ export declare const getUserName: (user: { displayName?: Nil<string>; email?: Nil<string>; uid?: Nil<string>; }) => Nil<string>;