Variable defaultConst

    default: {
        add: ((user: {
            email: string;
            password: string;
        }) => Promise<INewUser>);
        del: ((user: {
            id: string;
        }) => Promise<void>);
        get: (<T, Key>(id: string, data: T, key?: TUserGetKey) => Promise<undefined | IUser<T, Key>>);
        getAll: (<T>(data: T) => Promise<IUser<T, "id">[]>);
        getByUsernameAndPassword: ((user: {
            email: string;
            password: string;
        }) => Promise<undefined | IUserCheck>);
        update: ((user: {
            id: string;
        }, data: any[]) => Promise<void>);
    } = ...

    Type declaration

    • add: ((user: {
          email: string;
          password: string;
      }) => Promise<INewUser>)
        • (user): Promise<INewUser>
        • Add

          Parameters

          • user: {
                email: string;
                password: string;
            }

            User

            • email: string
            • password: string

          Returns Promise<INewUser>

          New user

    • del: ((user: {
          id: string;
      }) => Promise<void>)
        • (user): Promise<void>
        • Delete

          Parameters

          • user: {
                id: string;
            }

            User

            • id: string

          Returns Promise<void>

    • get: (<T, Key>(id: string, data: T, key?: TUserGetKey) => Promise<undefined | IUser<T, Key>>)
        • <T, Key>(id, data, key?): Promise<undefined | IUser<T, Key>>
        • Get

          Type Parameters

          Parameters

          • id: string

            User id (or key)

          • data: T

            Data

          • key: TUserGetKey = 'id'

            Key (override id selector)

          Returns Promise<undefined | IUser<T, Key>>

          User

    • getAll: (<T>(data: T) => Promise<IUser<T, "id">[]>)
        • <T>(data): Promise<IUser<T, "id">[]>
        • Get all

          Type Parameters

          Parameters

          • data: T

            Data

          Returns Promise<IUser<T, "id">[]>

          Users

    • getByUsernameAndPassword: ((user: {
          email: string;
          password: string;
      }) => Promise<undefined | IUserCheck>)
        • (user): Promise<undefined | IUserCheck>
        • Get by email and password

          Parameters

          • user: {
                email: string;
                password: string;
            }

            User

            • email: string
            • password: string

          Returns Promise<undefined | IUserCheck>

          User

    • update: ((user: {
          id: string;
      }, data: any[]) => Promise<void>)
        • (user, data): Promise<void>
        • Update

          Parameters

          • user: {
                id: string;
            }

            User

            • id: string
          • data: any[]

            Data

          Returns Promise<void>

    Generated using TypeDoc and TypeDoc Airthium Plugin