# @types/cli-interact

> TypeScript definitions for cli-interact

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

## Install

```sh
npm install @types/cli-interact
pnpm add @types/cli-interact
yarn add @types/cli-interact
bun add @types/cli-interact
```

## 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.1.4 |
| Published | 2023-11-07 |
| First published | 2018-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51469 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 0.1.4 (latest) — 2023-11-07
- 0.1.2 (ts4.3) — 2023-09-04
- 0.1.1 (ts3.6) — 2021-07-08
- 0.1.0 (ts2.0) — 2018-09-27
- 0.1.3 — 2023-10-17

## README

# Installation
> `npm install --save @types/cli-interact`

# Summary
This package contains type definitions for cli-interact (https://github.com/zhami/cli-interact).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cli-interact.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cli-interact/index.d.ts)
````ts
import { BasicOptions } from "readline-sync";

export interface ChoiceOptions {
    allowNoAnswer?: boolean | undefined;
    returnNumeric?: boolean | undefined;
}

export interface NumberOptions {
    allowNoAnswer?: boolean | undefined;
    requireInteger?: boolean | undefined;
}

export function getChar(promptText: string, allowedCharsAsString: string, flagAllowNoAnswer?: boolean): string;
export function getChoice(title: string, choices: string[], opts: ChoiceOptions & { returnNumeric: true }): number;
export function getChoice(title: string, choices: string[], opts?: ChoiceOptions): string;
export function getChoiceByChar(title: string, choices: string[], flagAllowNoAnswer?: boolean): string;
export function getInteger(promptText: string): number;
export function getIPversion(flagAllowNoAnswer?: boolean): string;
export function getNumber(promptText: string, opts?: boolean | NumberOptions): number;
export function getYesNo(title: string, flagAllowNoAnswer: true): boolean | undefined;
export function getYesNo(title: string, flagAllowNoAnswer?: false): boolean;
export function question(prompt: string, options?: BasicOptions): string;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
 * Dependencies: [@types/readline-sync](https://npmjs.com/package/@types/readline-sync)

# Credits
These definitions were written by [Florian Keller](https://github.com/ffflorian).

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