Type alias CacheTypeReducer<State, CachedType, RawType, PresentType, Fallback>

CacheTypeReducer<State, CachedType, RawType, PresentType, Fallback>: [State] extends ["cached"]
    ? CachedType
    : [State] extends ["raw"]
        ? RawType
        : [State] extends ["raw" | "cached"]
            ? PresentType
            : Fallback

Type Parameters

  • State extends CacheType

  • CachedType

  • RawType = CachedType

  • PresentType = CachedType | RawType

  • Fallback = PresentType | null

Generated using TypeDoc