# @types/lockfile

> TypeScript definitions for lockfile

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

## Install

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

## 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 | 1.0.4 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

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

## Recent versions

- 1.0.4 (latest) — 2023-11-07
- 1.0.2 (ts3.6) — 2021-07-06
- 1.0.1 (ts2.0) — 2019-02-13
- 0.4.33 — 2023-11-07
- 0.4.32 — 2023-10-18
- 1.0.3 — 2023-10-18
- 0.4.31 — 2021-07-06
- 1.0.0 — 2017-08-14
- 0.4.30 — 2017-08-14
- 0.4.29 — 2016-09-19
- 0.4.28 — 2016-07-14
- 0.4.27-alpha — 2016-07-08
- 0.4.26-alpha — 2016-07-04
- 0.4.25-alpha — 2016-07-02
- 0.4.24-alpha — 2016-07-01
- … 5 more at https://npm.io/package/@types/lockfile/versions

## README

# Installation
> `npm install --save @types/lockfile`

# Summary
This package contains type definitions for lockfile (https://github.com/npm/lockfile).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lockfile.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lockfile/index.d.ts)
````ts
export interface Options {
    wait?: number | undefined;
    pollPeriod?: number | undefined;
    stale?: number | undefined;
    retries?: number | undefined;
    retryWait?: number | undefined;
}

export function lock(path: string, opts: Options, callback: (err: Error | null) => void): void;
export function lock(path: string, callback: (err: Error | null) => void): void;
export function lockSync(path: string, opts?: Options): void;

export function unlock(path: string, callback: (err: Error | null) => void): void;
export function unlockSync(path: string): void;

export function check(path: string, opts: Options, callback: (err: Error | null, isLocked: boolean) => void): void;
export function check(path: string, callback: (err: Error | null, isLocked: boolean) => void): void;
export function checkSync(path: string, opts?: Options): boolean;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 20:08:00 GMT
 * Dependencies: none

# Credits
These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), and [BendingBender](https://github.com/BendingBender).

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