# @types/argv

> TypeScript definitions for argv

Latest version **0.0.8** (published 2023-11-06) · MIT license · 0 weekly downloads

## Install

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

## 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.0.8 |
| Published | 2023-11-06 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51469 |
| Maintainers | types |

## Links

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

## Recent versions

- 0.0.8 (latest) — 2023-11-06
- 0.0.5 (ts3.6) — 2021-07-07
- 0.0.4 (ts2.0) — 2016-09-19
- 0.0.7 — 2023-10-17
- 0.0.6 — 2023-09-22
- 0.0.3 — 2016-08-22
- 0.0.2 — 2016-08-19
- 0.0.1 — 2016-08-02

## README

# Installation
> `npm install --save @types/argv`

# Summary
This package contains type definitions for argv (https://www.npmjs.com/package/argv).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/argv.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/argv/index.d.ts)
````ts
// argv module
type args = {
    targets: string[];
    options: { [key: string]: any };
};

type helpOption = {
    name: string;
    type: string;
    short?: string | undefined;
    description?: string | undefined;
    example?: string | undefined;
};

type module = {
    mod: string;
    description: string;
    options: { [key: string]: helpOption };
};

type typeFunction = (value: any, ...arglist: any[]) => any;

type argv = {
    // Runs the arguments parser
    run: (argv?: string[]) => args;

    // Adding options to definitions list
    option: (mod: helpOption | helpOption[]) => argv;

    // Creating module
    mod: (object: module | module[]) => argv;

    // Creates custom type function
    type: (name: string | { [key: string]: typeFunction }, callback?: typeFunction) => any;

    // Setting version number, and auto setting version option
    version: (v: string) => argv;

    // Description setup
    info: (mod: string, description?: module) => argv;

    // Cleans out current options
    clear: () => argv;

    // Prints out the help doc
    help: (mod?: string) => argv;
};

declare const argv: argv;

export = argv;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:04 GMT
 * Dependencies: none

# Credits
These definitions were written by [Hookclaw](https://github.com/hookclaw).

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