Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / redux-utilities / asyncModelThunk / interface.ts
blob1691b9d112168789e8f071fbb6ebf8f3d71adc0a
1 import type { SerializedError } from '@reduxjs/toolkit';
3 export type ReducerValue<Returned> = {
4     value: Returned | undefined;
5     error: SerializedError | undefined;
6     meta: {
7         fetchedAt: number;
8         // If this state was fetched during the lifetime of this app. It's pruned for the persisted state.
9         fetchedEphemeral: boolean | undefined;
10     };
13 export enum CacheType {
14     None,
15     Stale,
16     StaleRefetch,
19 export type ThunkOptions<T> = {
20     cache?: CacheType;
21     thunkArg?: T;