mutoid
Version:
Reactive library for data fetching, caching, state management
12 lines (11 loc) • 468 B
TypeScript
import * as t from 'io-ts';
import { statusCodeT } from './statusCodeT';
export type CacheItemC<P extends t.Mixed = t.UnknownC> = t.TypeC<{
status: typeof statusCodeT;
payload: t.Type<t.TypeOf<P>, t.OutputOf<P>, unknown>;
}>;
export declare function cacheItemWithPayloadT<P extends t.Mixed>(payloadCodec: P, name?: string): CacheItemC<P>;
export declare const cacheItemT: t.TypeC<{
status: import("./statusCodeT").StatusCodeC;
payload: t.UnknownC;
}>;