Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 67x | /**
 * Global user information, to be replaced with a  specific version which
 * applies the methods.
 */
export let user = {
  userLoggedIn: (): boolean => false,
  getUserId: () => null,
  getName: () => null,
  getAccessToken: () => null,
  login: () => new Promise((resolve, reject) => reject()),
  logout: () => new Promise((resolve, reject) => reject()),
  getData: key => null,
  setData: (key, value) => null,
};
 
/**
 * Interface to clearly present the expected fields to linters when passing the user account
 * struct.
 */
export interface UserAccountInterface {
  userLoggedIn?: () => boolean;
  getUserId?: () => null;
  getName?: () => null;
  getAccessToken?: () => null;
  login?: () => Promise<any>;
  logout?: () => Promise<any>;
  getData?: (key: any) => null;
  setData?: (key: any, value: any) => null;
}
 
export default user;
  |