UNPKG

@gabliam/cache

Version:
36 lines (35 loc) 777 B
/** * Type of the `CacheGroup` decorator / constructor function. */ export interface CacheGroupDecorator { /** * Decorator that marks a class to use a specific cache group * * @usageNotes * * ```typescript * @CacheGroup('test') * @Service() * class GretterService { * constructor(private gretter: Gretter) { * gretter.greet(); * } * } * ``` */ (cacheGroupName: string): ClassDecorator; /** * see the `@Service` decorator. */ new (cacheGroupName: string): any; } /** * `CacheGroup` decorator and metadata. */ export interface CacheGroup { /** * Name of cache group */ cacheGroupName: string; } export declare const CacheGroup: CacheGroupDecorator;