@thisisagile/easy
Version:
Straightforward library for building domain-driven microservice architectures
13 lines (12 loc) • 483 B
TypeScript
import { Func } from './Func';
import { CacheAge } from './CacheAge';
import { Construct } from './Constructor';
export interface Store<To = any, From = any> {
execute: (fetch: From, f: Func<Promise<To>, From>) => Promise<To>;
}
export type CacheOptions = {
expiresIn?: CacheAge;
store?: Construct<Store>;
};
export declare const toCacheOptions: (co: Partial<CacheOptions>) => CacheOptions;
export declare const cache: (options: Partial<CacheOptions>) => ClassDecorator;