UNPKG

rwlockfile

Version:

lockfile utility with reader/writers

19 lines (18 loc) 626 B
export interface LockfileOptions { sync?: boolean; } export declare function lockfile(prop: string, opts?: LockfileOptions): MethodDecorator; export interface RWLockfileOptions { ifLocked?: string; } export declare function rwlockfile(prop: string, type: 'read' | 'write', opts?: RWLockfileOptions): MethodDecorator; export declare function onceAtATime(argKey?: number): MethodDecorator; export interface IDecoratorOptions<T> { target: Object; propertyName: string | symbol; descriptor: TypedPropertyDescriptor<T>; original: T; } export interface IDecorator<T> { (opts: IDecoratorOptions<T>): T; }