Socket
Socket
Sign inDemoInstall

@types/inquirer

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/inquirer - npm Package Compare versions

Comparing version 8.2.6 to 8.2.7

115

inquirer v8.2/index.d.ts

@@ -15,25 +15,25 @@ // Type definitions for inquirer 8.2

// TypeScript Version: 4.2
import { Interface as ReadlineInterface } from 'readline';
import { Observable } from 'rxjs';
import { ThroughStream } from 'through';
import Choice = require('./lib/objects/choice');
import Choices = require('./lib/objects/choices');
import './lib/objects/separator';
import './lib/prompts/base';
import CheckboxPrompt = require('./lib/prompts/checkbox');
import ConfirmPrompt = require('./lib/prompts/confirm');
import EditorPrompt = require('./lib/prompts/editor');
import ExpandPrompt = require('./lib/prompts/expand');
import InputPrompt = require('./lib/prompts/input');
import ListPrompt = require('./lib/prompts/list');
import NumberPrompt = require('./lib/prompts/number');
import PasswordPrompt = require('./lib/prompts/password');
import RawListPrompt = require('./lib/prompts/rawlist');
import UI = require('./lib/ui/baseUI');
import './lib/ui/bottom-bar';
import './lib/ui/prompt';
import './lib/utils/events';
import './lib/utils/paginator';
import './lib/utils/readline';
import './lib/utils/screen-manager';
import { Interface as ReadlineInterface } from "readline";
import { Observable } from "rxjs";
import { ThroughStream } from "through";
import Choice = require("./lib/objects/choice");
import Choices = require("./lib/objects/choices");
import "./lib/objects/separator";
import "./lib/prompts/base";
import CheckboxPrompt = require("./lib/prompts/checkbox");
import ConfirmPrompt = require("./lib/prompts/confirm");
import EditorPrompt = require("./lib/prompts/editor");
import ExpandPrompt = require("./lib/prompts/expand");
import InputPrompt = require("./lib/prompts/input");
import ListPrompt = require("./lib/prompts/list");
import NumberPrompt = require("./lib/prompts/number");
import PasswordPrompt = require("./lib/prompts/password");
import RawListPrompt = require("./lib/prompts/rawlist");
import UI = require("./lib/ui/baseUI");
import "./lib/ui/bottom-bar";
import "./lib/ui/prompt";
import "./lib/utils/events";
import "./lib/utils/paginator";
import "./lib/utils/readline";
import "./lib/utils/screen-manager";

@@ -85,3 +85,3 @@ /**

*/
type RegisterFunction = PromptModuleBase['registerPrompt'];
type RegisterFunction = PromptModuleBase["registerPrompt"];

@@ -91,3 +91,3 @@ /**

*/
type RestoreFunction = PromptModuleBase['restoreDefaultPrompts'];
type RestoreFunction = PromptModuleBase["restoreDefaultPrompts"];

@@ -129,3 +129,4 @@ /**

*/
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I
: never;

@@ -135,3 +136,3 @@ /**

*/
export interface Answers extends Record<string, any> { }
export interface Answers extends Record<string, any> {}

@@ -144,3 +145,3 @@ /**

*/
export type Validator<T extends Answers = Answers> = Question<T>['validate'];
export type Validator<T extends Answers = Answers> = Question<T>["validate"];

@@ -153,3 +154,3 @@ /**

*/
export type Transformer<T extends Answers = Answers> = InputQuestionOptions<T>['transformer'];
export type Transformer<T extends Answers = Answers> = InputQuestionOptions<T>["transformer"];

@@ -234,3 +235,3 @@ /**

*/
type: 'separator';
type: "separator";

@@ -250,3 +251,3 @@ /**

*/
type?: 'choice' | undefined;
type?: "choice" | undefined;

@@ -430,4 +431,4 @@ /**

name: K;
answer: T[K]
}
answer: T[K];
};
}[keyof T];

@@ -470,3 +471,3 @@

*/
type?: 'input' | undefined;
type?: "input" | undefined;
}

@@ -480,3 +481,3 @@

*/
export interface NumberQuestionOptions<T extends Answers = Answers> extends InputQuestionOptions<T> { }
export interface NumberQuestionOptions<T extends Answers = Answers> extends InputQuestionOptions<T> {}

@@ -493,3 +494,3 @@ /**

*/
type: 'number';
type: "number";
}

@@ -520,3 +521,3 @@

*/
type: 'password';
type: "password";
}

@@ -533,3 +534,5 @@

*/
export interface LoopableListQuestionOptionsBase<T extends Answers, TChoiceMap> extends ListQuestionOptionsBase<T, TChoiceMap> {
export interface LoopableListQuestionOptionsBase<T extends Answers, TChoiceMap>
extends ListQuestionOptionsBase<T, TChoiceMap>
{
/**

@@ -548,3 +551,4 @@ * A value indicating whether choices in a list should be looped.

export interface ListQuestionOptions<T extends Answers = Answers>
extends LoopableListQuestionOptionsBase<T, ListChoiceMap<T>> { }
extends LoopableListQuestionOptionsBase<T, ListChoiceMap<T>>
{}

@@ -561,3 +565,3 @@ /**

*/
type: 'list';
type: "list";
}

@@ -571,3 +575,3 @@

*/
export interface RawListQuestionOptions<T extends Answers = Answers> extends ListQuestionOptions<T> { }
export interface RawListQuestionOptions<T extends Answers = Answers> extends ListQuestionOptions<T> {}

@@ -584,3 +588,3 @@ /**

*/
type: 'rawlist';
type: "rawlist";
}

@@ -595,3 +599,4 @@

export interface ExpandQuestionOptions<T extends Answers = Answers>
extends ListQuestionOptionsBase<T, ExpandChoiceMap<T>> { }
extends ListQuestionOptionsBase<T, ExpandChoiceMap<T>>
{}

@@ -608,3 +613,3 @@ /**

*/
type: 'expand';
type: "expand";
}

@@ -619,3 +624,4 @@

export interface CheckboxQuestionOptions<T extends Answers = Answers>
extends LoopableListQuestionOptionsBase<T, CheckboxChoiceMap<T>> { }
extends LoopableListQuestionOptionsBase<T, CheckboxChoiceMap<T>>
{}

@@ -632,3 +638,3 @@ /**

*/
type: 'checkbox';
type: "checkbox";
}

@@ -642,3 +648,3 @@

*/
export interface ConfirmQuestionOptions<T extends Answers = Answers> extends Question<T> { }
export interface ConfirmQuestionOptions<T extends Answers = Answers> extends Question<T> {}

@@ -655,3 +661,3 @@ /**

*/
type: 'confirm';
type: "confirm";
}

@@ -684,3 +690,3 @@

*/
type: 'editor';
type: "editor";
}

@@ -752,3 +758,3 @@

*/
export type QuestionTypeName = DistinctQuestion['type'];
export type QuestionTypeName = DistinctQuestion["type"];

@@ -799,3 +805,6 @@ /**

*/
<T extends Answers = Answers>(questions: QuestionCollection<T>, initialAnswers?: Partial<T>): Promise<T> & { ui: ui.Prompt<T> };
<T extends Answers = Answers>(
questions: QuestionCollection<T>,
initialAnswers?: Partial<T>,
): Promise<T> & { ui: ui.Prompt<T> };

@@ -834,3 +843,3 @@ /**

*/
type PromptState = LiteralUnion<'pending' | 'idle' | 'loading' | 'answered' | 'done'>;
type PromptState = LiteralUnion<"pending" | "idle" | "loading" | "answered" | "done">;

@@ -1160,3 +1169,3 @@ /**

*/
readonly type: 'separator';
readonly type: "separator";

@@ -1163,0 +1172,0 @@ /**

@@ -1,2 +0,2 @@

import { Answers, CheckboxChoiceOptions, ExpandChoiceOptions, ListChoiceOptions } from '../..';
import { Answers, CheckboxChoiceOptions, ExpandChoiceOptions, ListChoiceOptions } from "../..";

@@ -10,7 +10,8 @@ /**

declare class Choice<T extends Answers = Answers>
implements ListChoiceOptions<T>, CheckboxChoiceOptions<T>, ExpandChoiceOptions {
implements ListChoiceOptions<T>, CheckboxChoiceOptions<T>, ExpandChoiceOptions
{
/**
* @inheritdoc
*/
type?: 'choice' | undefined;
type?: "choice" | undefined;

@@ -17,0 +18,0 @@ /**

@@ -1,4 +0,4 @@

import { AllChoiceMap, Answers, KeyUnion, UnionToIntersection } from '../..';
import Choice = require('./choice');
import Separator = require('./separator');
import { AllChoiceMap, Answers, KeyUnion, UnionToIntersection } from "../..";
import Choice = require("./choice");
import Separator = require("./separator");

@@ -19,3 +19,3 @@ /**

*/
type RealChoice<T extends Answers> = Exclude<DistinctChoice<T>, { type: Separator['type'] }>;
type RealChoice<T extends Answers> = Exclude<DistinctChoice<T>, { type: Separator["type"] }>;

@@ -22,0 +22,0 @@ /**

@@ -1,5 +0,5 @@

import { Interface as ReadLineInterface } from 'readline';
import { Observable } from 'rxjs';
import inquirer = require('../..');
import ScreenManager = require('../utils/screen-manager');
import { Interface as ReadLineInterface } from "readline";
import { Observable } from "rxjs";
import inquirer = require("../..");
import ScreenManager = require("../utils/screen-manager");

@@ -6,0 +6,0 @@ /**

@@ -1,5 +0,5 @@

import { Interface as ReadLineInterface } from 'readline';
import inquirer = require('../..');
import Paginator = require('../utils/paginator');
import Prompt = require('./base');
import { Interface as ReadLineInterface } from "readline";
import inquirer = require("../..");
import Paginator = require("../utils/paginator");
import Prompt = require("./base");

@@ -6,0 +6,0 @@ /**

@@ -1,4 +0,4 @@

import { Interface as ReadlineInterface } from 'readline';
import { Answers, ConfirmQuestionOptions } from '../..';
import Prompt = require('./base');
import { Interface as ReadlineInterface } from "readline";
import { Answers, ConfirmQuestionOptions } from "../..";
import Prompt = require("./base");

@@ -5,0 +5,0 @@ /**

@@ -1,5 +0,5 @@

import { Interface as ReadlineInterface } from 'readline';
import { Subject, Subscription } from 'rxjs';
import inquirer = require('../..');
import Prompt = require('./base');
import { Interface as ReadlineInterface } from "readline";
import { Subject, Subscription } from "rxjs";
import inquirer = require("../..");
import Prompt = require("./base");

@@ -6,0 +6,0 @@ /**

@@ -1,5 +0,5 @@

import { Interface as ReadlineInterface } from 'readline';
import inquirer = require('../..');
import Paginator = require('../utils/paginator');
import Prompt = require('./base');
import { Interface as ReadlineInterface } from "readline";
import inquirer = require("../..");
import Paginator = require("../utils/paginator");
import Prompt = require("./base");

@@ -121,3 +121,3 @@ /**

*/
protected validateChoices(choices: ExpandPrompt<TQuestion>['opt']['choices']): void;
protected validateChoices(choices: ExpandPrompt<TQuestion>["opt"]["choices"]): void;

@@ -136,3 +136,3 @@ /**

*/
protected generateChoicesString(choices: ExpandPrompt<TQuestion>['opt']['choices'], defaultChoice: any): string;
protected generateChoicesString(choices: ExpandPrompt<TQuestion>["opt"]["choices"], defaultChoice: any): string;

@@ -148,5 +148,5 @@ /**

*/
protected renderChoices(choices: ExpandPrompt<TQuestion>['opt']['choices'], pointer: string): string;
protected renderChoices(choices: ExpandPrompt<TQuestion>["opt"]["choices"], pointer: string): string;
}
export = ExpandPrompt;

@@ -1,4 +0,4 @@

import { Interface as ReadlineInterface } from 'readline';
import inquirer = require('../..');
import Prompt = require('./base');
import { Interface as ReadlineInterface } from "readline";
import inquirer = require("../..");
import Prompt = require("./base");

@@ -5,0 +5,0 @@ /**

@@ -1,5 +0,5 @@

import { Interface as ReadlineInterface } from 'readline';
import { Answers, ListQuestionOptions } from '../..';
import Paginator = require('../utils/paginator');
import Prompt = require('./base');
import { Interface as ReadlineInterface } from "readline";
import { Answers, ListQuestionOptions } from "../..";
import Paginator = require("../utils/paginator");
import Prompt = require("./base");

@@ -6,0 +6,0 @@ /**

@@ -1,4 +0,4 @@

import { Interface as ReadlineInterface } from 'readline';
import { Answers, NumberQuestionOptions } from '../..';
import InputPrompt = require('./input');
import { Interface as ReadlineInterface } from "readline";
import { Answers, NumberQuestionOptions } from "../..";
import InputPrompt = require("./input");

@@ -5,0 +5,0 @@ /**

@@ -1,4 +0,4 @@

import { Interface as ReadlineInterface } from 'readline';
import inquirer = require('../..');
import Prompt = require('./base');
import { Interface as ReadlineInterface } from "readline";
import inquirer = require("../..");
import Prompt = require("./base");

@@ -5,0 +5,0 @@ /**

@@ -1,5 +0,5 @@

import { Interface as ReadlineInterface } from 'readline';
import inquirer = require('../..');
import Paginator = require('../utils/paginator');
import Prompt = require('./base');
import { Interface as ReadlineInterface } from "readline";
import inquirer = require("../..");
import Paginator = require("../utils/paginator");
import Prompt = require("./base");

@@ -92,3 +92,3 @@ /**

*/
protected onArrowKey(type: 'up' | 'down'): void;
protected onArrowKey(type: "up" | "down"): void;

@@ -95,0 +95,0 @@ /**

@@ -1,3 +0,3 @@

import { Interface as ReadlineInterface } from 'readline';
import inquirer = require('../..');
import { Interface as ReadlineInterface } from "readline";
import inquirer = require("../..");

@@ -4,0 +4,0 @@ /**

@@ -1,3 +0,3 @@

import { ui } from '../..';
import { ui } from "../..";
export = ui.BottomBar;

@@ -1,3 +0,3 @@

import { ui } from '../..';
import { ui } from "../..";
export = ui.Prompt;

@@ -1,3 +0,3 @@

import { Interface as ReadlineInterface, Key } from 'readline';
import { Observable } from 'rxjs';
import { Interface as ReadlineInterface, Key } from "readline";
import { Observable } from "rxjs";

@@ -4,0 +4,0 @@ /**

@@ -1,4 +0,4 @@

import Choices = require('../objects/choices');
import Choices = require("../objects/choices");
type Direction = 'up' | 'down';
type Direction = "up" | "down";
interface Options {

@@ -5,0 +5,0 @@ choices: Choices;

@@ -1,2 +0,2 @@

import ScreenManager = require('./screen-manager');
import ScreenManager = require("./screen-manager");

@@ -3,0 +3,0 @@ interface PaginatorOptions {

@@ -1,2 +0,2 @@

import { Interface as ReadlineInterface } from 'readline';
import { Interface as ReadlineInterface } from "readline";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import { Interface as ReadLineInterface } from 'readline';
import { Interface as ReadLineInterface } from "readline";

@@ -3,0 +3,0 @@ /**

@@ -1,3 +0,3 @@

import { Observable } from 'rxjs';
import { Answers, DistinctQuestion, KeyUnion, UnionToIntersection } from '../..';
import { Observable } from "rxjs";
import { Answers, DistinctQuestion, KeyUnion, UnionToIntersection } from "../..";

@@ -4,0 +4,0 @@ /**

{
"name": "@types/inquirer",
"version": "8.2.6",
"version": "8.2.7",
"description": "TypeScript definitions for inquirer",

@@ -71,4 +71,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/inquirer",

},
"typesPublisherContentHash": "28d0b12b7a01151d41770e9fbc3b5431886cc215a07f5d21d7fb2331c4e09c66",
"typeScriptVersion": "4.2"
"typesPublisherContentHash": "b91fa77cf1c584b8dbc2da52fcc55540dcd8b3d55e7479fb7ef522e3e911ed76",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 14 Feb 2023 22:09:22 GMT
* Last updated: Sun, 08 Oct 2023 23:35:10 GMT
* Dependencies: [@types/rxjs](https://npmjs.com/package/@types/rxjs), [@types/through](https://npmjs.com/package/@types/through)

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc