# @types/promptly

> TypeScript definitions for promptly

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

## Install

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

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

## Links

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

## Dependencies (1)

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

## Recent versions

- 3.0.5 (latest) — 2023-11-07
- 3.0.2 (ts3.6) — 2021-07-08
- 3.0.1 (ts3.3) — 2020-12-20
- 3.0.0 (ts2.0) — 2019-08-15
- 3.0.4 — 2023-10-18
- 3.0.3 — 2023-09-24
- 1.1.28 — 2016-09-19
- 1.1.27 — 2016-07-14
- 1.1.26-alpha — 2016-07-08
- 1.1.25-alpha — 2016-07-04
- 1.1.24-alpha — 2016-07-02
- 1.1.23-alpha — 2016-07-01
- 1.1.22-alpha — 2016-07-01
- 1.1.21-alpha — 2016-05-25
- 1.1.20-alpha — 2016-05-20
- … 2 more at https://npm.io/package/@types/promptly/versions

## README

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

import stream = require("stream");

interface Callback {
    (err: Error, value: string): void;
}

export interface Options {
    default?: string | undefined;
    trim?: boolean | undefined;
    validator?: any;
    retry?: boolean | undefined;
    silent?: boolean | undefined;
    replace?: string | undefined;
    input?: NodeJS.ReadableStream | undefined;
    output?: NodeJS.WritableStream | undefined;
}

export declare function prompt(message: string, fn?: Callback): Promise<string>;
export declare function prompt(message: string, opts: Options, fn?: Callback): Promise<string>;

export declare function password(message: string, fn?: Callback): Promise<string>;
export declare function password(message: string, opts: Options, fn?: Callback): Promise<string>;

export declare function confirm(message: string, fn?: Callback): Promise<boolean>;
export declare function confirm(message: string, opts: Options, fn?: Callback): Promise<boolean>;

export declare function choose(message: string, choices: string[], fn?: Callback): Promise<string>;
export declare function choose(message: string, choices: string[], opts: Options, fn?: Callback): Promise<string>;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Dan Spencer](https://github.com/danrspencer), and [Alex Ilyaev](https://github.com/alexilyaev).

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