UNPKG

@imqueue/rpc

Version:

RPC-like client-service implementation over messaging queue

19 lines (18 loc) 708 B
export interface LockOptions { disabled?: boolean; skipArgs?: number[]; } /** * \@lock() decorator implementation * Will make all simultaneous similar method calls locked to be resolved with * the first obtained values. Similarity is identified by a bypassed method * argument values. * * @param {boolean|LockOptions} enabledOrOptions - whether to enable locks or not * @return {( * target: any, * methodName: (string), * descriptor: TypedPropertyDescriptor<(...args: any[]) => any> * ) => void} */ export declare function lock(enabledOrOptions?: boolean | LockOptions): (target: any, methodName: string | symbol, descriptor: TypedPropertyDescriptor<(...args: any[]) => any>) => void;