# @types/rwlock

> TypeScript definitions for rwlock

Latest version **5.0.6** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rwlock
pnpm add @types/rwlock
yarn add @types/rwlock
bun add @types/rwlock
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.6 |
| Published | 2023-11-07 |
| First published | 2017-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/rwlock
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rwlock
- npm.io page: https://npm.io/package/@types/rwlock

## Recent versions

- 5.0.6 (latest) — 2023-11-07
- 5.0.3 (ts3.6) — 2021-07-08
- 5.0.2 (ts2.0) — 2017-04-28
- 5.0.5 — 2023-10-18
- 5.0.4 — 2023-09-27
- 5.0.1 — 2017-04-18
- 5.0.0 — 2017-04-18

## README

# Installation
> `npm install --save @types/rwlock`

# Summary
This package contains type definitions for rwlock (https://github.com/71104/rwlock).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rwlock.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rwlock/index.d.ts)
````ts
declare class ReadWriteGeneric<T> {
    readLock(callback: T, options?: ReadWriteLock.Options): void;
    readLock(key: string, callback: T, options?: ReadWriteLock.Options): void;
    writeLock(callback: T, options?: ReadWriteLock.Options): void;
    writeLock(key: string, callback: T, options?: ReadWriteLock.Options): void;
}
declare namespace ReadWriteLock {
    type Release = () => void;

    type Callback = (release: Release) => void;

    type AsyncCallback = (err: Error, release: Release) => void;

    interface Options {
        scope?: any;
        timeout?: number | undefined;
        timeoutCallback?(): void;
    }
}

declare class ReadWriteLock extends ReadWriteGeneric<ReadWriteLock.Callback> {
    constructor();
    async: ReadWriteGeneric<ReadWriteLock.AsyncCallback>;
}
export = ReadWriteLock;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Federico Caselli](https://github.com/CaselIT/typings-rwlock).

---
_Source: https://npm.io/package/@types/rwlock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
