# @types/dynamodb-lock-client

> TypeScript definitions for dynamodb-lock-client

Latest version **0.7.7** (published 2024-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/dynamodb-lock-client
pnpm add @types/dynamodb-lock-client
yarn add @types/dynamodb-lock-client
bun add @types/dynamodb-lock-client
```

## 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; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.7.7 |
| Published | 2024-03-30 |
| First published | 2021-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51431 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 0.7.7 (latest) — 2024-03-30
- 0.7.6 (ts4.5) — 2023-11-07
- 0.7.3 (ts4.3) — 2023-09-06
- 0.7.2 (ts4.2) — 2023-02-03
- 0.7.1 (ts3.6) — 2021-07-08
- 0.7.0 (ts3.5) — 2021-04-03
- 0.7.5 — 2023-10-18
- 0.7.4 — 2023-09-22

## README

# Installation
> `npm install --save @types/dynamodb-lock-client`

# Summary
This package contains type definitions for dynamodb-lock-client (https://github.com/tristanls/dynamodb-lock-client#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dynamodb-lock-client.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dynamodb-lock-client/index.d.ts)
````ts
/// <reference types="node" />

import { EventEmitter } from "events";

export interface Lock extends EventEmitter {
    release(callback: (error: Error) => void): void;
    fencingToken: number;
}

interface GenericConfig {
    dynamodb: {
        delete: (...args: any[]) => any;
        get: (...args: any[]) => any;
        put: (...args: any[]) => any;
    };
    lockTable: string;
    partitionKey: string;
    sortKey?: string | undefined;
    owner?: string | undefined;
    retryCount?: number | undefined;
}

export interface FailClosedConfig extends GenericConfig {
    acquirePeriodMs: number;
}

export interface FailOpenConfig extends GenericConfig {
    heartbeatPeriodMs?: number | undefined;
    leaseDurationMs: number;
    trustLocalTime?: boolean | undefined;
}

export class LockClient<
    PartitionTableKeyType extends string | number | Buffer | Record<string, string | Buffer | number>,
> {
    acquireLock(id: PartitionTableKeyType, callback: (error: Error, lock: Lock) => void): void;
}

export class FailClosed<
    PartitionTableKeyType extends string | number | Buffer | Record<string, string | Buffer | number>,
> extends LockClient<PartitionTableKeyType> {
    constructor(config: FailClosedConfig);
}

export class FailOpen<PartitionTableKeyType extends string | number | Buffer | Record<string, string | Buffer | number>>
    extends LockClient<PartitionTableKeyType>
{
    constructor(config: FailOpenConfig);
}

// Disabled automatic exporting
export {};

````

### Additional Details
 * Last updated: Sat, 30 Mar 2024 06:35:27 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by .

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