@epilogo/stringifyr
Version:
Stringifyr JS bundle
16 lines (15 loc) • 481 B
TypeScript
import { IStorage } from "./IStorage";
import { AsyncReturnType } from "./Types";
type TPersistLayerParams = {
storage?: IStorage;
noCache?: boolean;
};
export declare class PersistLayer {
private readonly storage?;
private readonly noCache;
private inMemory?;
constructor(params: TPersistLayerParams);
sync<T>(cacheKey: string): T;
wrap<T extends (...any: any) => Promise<any>>(cacheKey: string, call: T): Promise<AsyncReturnType<T>>;
}
export {};