# @types/nopt

> TypeScript definitions for nopt

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

## Install

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

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

## Links

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

## Recent versions

- 3.0.32 (latest) — 2023-11-07
- 3.0.29 (ts2.0) — 2016-09-19
- 3.0.31 — 2023-10-18
- 3.0.30 — 2023-09-23
- 3.0.28 — 2016-07-14
- 3.0.27-alpha — 2016-07-08
- 3.0.26-alpha — 2016-07-04
- 3.0.25-alpha — 2016-07-02
- 3.0.24-alpha — 2016-07-01
- 3.0.23-alpha — 2016-07-01
- 3.0.22-alpha — 2016-05-25
- 3.0.21-alpha — 2016-05-20
- 3.0.16-alpha — 2016-05-19
- 3.0.15-alpha — 2016-05-17

## README

# Installation
> `npm install --save @types/nopt`

# Summary
This package contains type definitions for nopt (https://github.com/npm/nopt).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nopt.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nopt/index.d.ts)
````ts
interface CommandData {
    [key: string]: string;
}

interface TypeDefs {
    [key: string]: TypeInfo;
}

interface TypeInfo {
    type: Object;
    validate: (data: CommandData, k: string, val: string) => boolean;
}

declare namespace nopt {
    export function clean(data: CommandData, types: FlagTypeMap, typeDefs?: TypeDefs): string;
    export var typeDefs: TypeDefs;
}

interface FlagTypeMap {
    [k: string]: Object;
}

interface ShortFlags {
    [k: string]: string[] | string;
}

declare function nopt(types: FlagTypeMap, shorthands?: ShortFlags, args?: string[], slice?: number): OptionsParsed;

interface OptionsParsed {
    [k: string]: any;
    argv: {
        remain: string[];
        cooked: string[];
        original: string[];
    };
}

export = nopt;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [jbondc](https://github.com/jbondc).

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