default: {
    add: (user: { email: string; password: string }) => Promise<INewUser>;
    del: (user: { id: string }) => Promise<void>;
    get: <T extends TUserGet>(
        id: string,
        data: T,
    ) => Promise<undefined | IUserGet<T>>;
    getAll: <T extends TUserGet>(data: T) => Promise<IUser<T>[]>;
    getBy: <T extends TUserGet, Key extends TUserGetKey>(
        key: string,
        data: T,
        keyName: Key,
    ) => Promise<undefined | IUser<T, TUserGetKey>>;
    getWithData: <T extends TUserGet>(
        id: string,
        data: T,
    ) => Promise<undefined | IUserWithData<T>>;
    login: (
        user: { email: string; password: string },
    ) => Promise<null | IUserCheck & { email: string }>;
    update: (user: { id: string }, data: any[]) => Promise<void>;
} = ...

Type declaration

  • add: (user: { email: string; password: string }) => Promise<INewUser>
  • del: (user: { id: string }) => Promise<void>
  • get: <T extends TUserGet>(id: string, data: T) => Promise<undefined | IUserGet<T>>
  • getAll: <T extends TUserGet>(data: T) => Promise<IUser<T>[]>
  • getBy: <T extends TUserGet, Key extends TUserGetKey>(
        key: string,
        data: T,
        keyName: Key,
    ) => Promise<undefined | IUser<T, TUserGetKey>>
  • getWithData: <T extends TUserGet>(
        id: string,
        data: T,
    ) => Promise<undefined | IUserWithData<T>>
  • login: (
        user: { email: string; password: string },
    ) => Promise<null | IUserCheck & { email: string }>
  • update: (user: { id: string }, data: any[]) => Promise<void>