# @types/lockfile-lint-api

> TypeScript definitions for lockfile-lint-api

Latest version **5.1.5** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

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

## 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.1.5 |
| Published | 2023-11-21 |
| First published | 2020-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

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

## Recent versions

- 5.1.5 (latest) — 2023-11-21
- 5.1.2 (ts4.3) — 2023-08-30
- 5.1.1 (ts3.9) — 2021-07-08
- 5.1.4 — 2023-11-07
- 5.1.3 — 2023-10-18
- 5.1.0 — 2020-08-13

## README

# Installation
> `npm install --save @types/lockfile-lint-api`

# Summary
This package contains type definitions for lockfile-lint-api (https://github.com/lirantal/lockfile-lint/tree/master/packages/lockfile-lint-api).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lockfile-lint-api.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lockfile-lint-api/index.d.ts)
````ts
export type Hosts = readonly string[];

export interface PackageMetadata {
    version: string;
    resolved?: string | undefined;
    dependencies?: Record<string, string> | undefined; // e.g. {'balanced-match': '^1.0.0', 'concat-map': '0.0.1'}
}

export type Packages = Record<string, PackageMetadata>;

export interface ValidationOptions {
    emptyHostname?: boolean | undefined;
}

export interface Error {
    message: string;
    package: string;
}

export interface ValidationError {
    type: "error";
    errors: Error[];
}

export interface ValidationSuccess {
    type: "success";
    object: Packages;
}

export type ValidationResult = ValidationError | ValidationSuccess;

export class ValidateHost {
    constructor(packages: { packages: Packages });
    validate(hosts: Hosts, options?: ValidationOptions): ValidationResult;
    validateSingle(packageName: string, hosts: Hosts): boolean;
}

export class ValidateHttps {
    constructor(packages: { packages: Packages });
    validate(): ValidationResult;
}

export class ValidateScheme {
    constructor(packages: { packages: Packages });
    validate(schemes: readonly string[]): ValidationResult;
}

export class ValidateUrl {
    constructor(packages: { packages: Packages });
    validate(allowedUrls: readonly string[], options?: ValidationOptions): ValidationResult;
    validateSingle(packageName: string, allowedUrls: Hosts): boolean;
}

export interface ParseLockfileOptions {
    lockfilePath: string;
    lockfileType: string;
}

export interface ParseLockfileResult {
    type: "success";
    object: Packages;
}

export class ParseLockfile {
    constructor(options: ParseLockfileOptions);
    parseSync(): ParseLockfileResult;
}

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: none

# Credits
These definitions were written by [Markus Lasermann](https://github.com/snaptags).

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