1.4.2 • Published 6 months ago
@types/async-lock v1.4.2
Installation
npm install --save @types/async-lock
Summary
This package contains type definitions for async-lock (https://github.com/rain1017/async-lock).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async-lock.
index.d.ts
// Type definitions for async-lock 1.1
// Project: https://github.com/rain1017/async-lock, https://github.com/rogierschouten/async-lock
// Definitions by: Alejandro <https://github.com/afharo>
// Anatoly <https://github.com/rhymmor>
// Humulus <https://github.com/humulus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
type AsyncLockDoneCallback<T> = (err?: Error, ret?: T) => void;
interface AsyncLockOptions {
timeout?: number | undefined;
maxPending?: number | undefined;
maxOccupationTime?: number | undefined;
domainReentrant?: boolean | undefined;
Promise?: any;
skipQueue?: boolean | undefined;
}
declare class AsyncLock {
constructor(options?: AsyncLockOptions);
acquire<T>(key: string | string[],
fn: (() => T | PromiseLike<T>) | ((done: AsyncLockDoneCallback<T>) => any),
opts?: AsyncLockOptions): Promise<T>;
acquire<T>(key: string | string[],
fn: (done: AsyncLockDoneCallback<T>) => any,
cb: AsyncLockDoneCallback<T>,
opts?: AsyncLockOptions): void;
isBusy(key?: string): boolean;
}
declare namespace AsyncLock { }
export = AsyncLock;
Additional Details
- Last updated: Fri, 15 Apr 2022 07:31:18 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Alejandro, Anatoly, and Humulus.
1.4.2
6 months ago
1.4.1
7 months ago
1.4.0
1 year ago
1.3.0
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
3 years ago
1.1.2
4 years ago
1.1.1
5 years ago
1.1.0
6 years ago
0.0.21
6 years ago
0.0.20
7 years ago
0.0.19
8 years ago
0.0.18
8 years ago
0.0.17-alpha
8 years ago
0.0.16-alpha
8 years ago
0.0.15-alpha
8 years ago
0.0.14-alpha
8 years ago
0.0.13-alpha
8 years ago
0.0.12-alpha
8 years ago
0.0.11-alpha
8 years ago
0.0.6-alpha
8 years ago
0.0.5-alpha
8 years ago