Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/redlock
Advanced tools
npm install --save @types/redlock
This package contains type definitions for redlock (https://github.com/mike-marcacci/node-redlock).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redlock/v2.
// Type definitions for redlock 2.x
// Project: https://github.com/mike-marcacci/node-redlock
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.2
import * as redis from 'redis';
import * as Promise from 'bluebird';
export = Redlock;
declare namespace Redlock {
type Callback<T> = (err: any, value?: T) => void;
class Lock {
redlock: Redlock;
resource: string;
value: any;
expiration: number;
constructor(redlock: Redlock, resource: string, value: any, expiration: number);
unlock(callback?: Callback<void>): Promise<void>;
extend(ttl: number, callback?: Callback<Lock>): Promise<Lock>;
}
interface Options {
driftFactor?: number | undefined;
retryCount?: number | undefined;
retryDelay?: number | undefined;
}
class LockError extends Error {
readonly name: 'LockError';
constructor(message?: string);
}
}
declare class Redlock {
LockError: typeof Redlock.LockError;
Lock: typeof Redlock.Lock;
driftFactor: number;
retryCount: number;
retryDelay: number;
servers: redis.RedisClient[];
constructor(clients: any[], options?: Redlock.Options);
acquire(resource: string, ttl: number, callback?: Redlock.Callback<Redlock.Lock>): Promise<Redlock.Lock>;
lock(resource: string, ttl: number, callback?: Redlock.Callback<Redlock.Lock>): Promise<Redlock.Lock>;
disposer(resource: string, ttl: number, errorHandler?: Redlock.Callback<void>): Promise.Disposer<Redlock.Lock>; // bluebird Disposer
release(lock: Redlock.Lock, callback?: Redlock.Callback<void>): Promise<void>;
unlock(lock: Redlock.Lock, callback?: Redlock.Callback<void>): Promise<void>;
extend(lock: Redlock.Lock, ttl: number, callback?: Redlock.Callback<Redlock.Lock>): Promise<Redlock.Lock>;
_lock(resource: string, value: string, ttl: number, callback?: Redlock.Callback<Redlock.Lock>): Promise<Redlock.Lock>;
}
These definitions were written by Ilya Mochalov.
FAQs
TypeScript definitions for redlock
The npm package @types/redlock receives a total of 153,500 weekly downloads. As such, @types/redlock popularity was classified as popular.
We found that @types/redlock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.