Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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 7.3.1 to 7.3.2

40

inquirer/index.d.ts

@@ -232,2 +232,8 @@ // Type definitions for inquirer 7.3

* Represents a dynamic property for a question.
*
* @template T
* The type of the property.
*
* @template TAnswers
* The type of the answers.
*/

@@ -238,2 +244,8 @@ type DynamicQuestionProperty<T, TAnswers extends Answers = Answers> = T | ((answers: TAnswers) => T);

* Represents a dynamic property for a question which can be fetched asynchronously.
*
* @template T
* The type of the property.
*
* @template TAnswers
* The type of the answers.
*/

@@ -322,7 +334,4 @@ type AsyncDynamicQuestionProperty<T, TAnswers extends Answers = Answers> = DynamicQuestionProperty<T | Promise<T>, TAnswers>;

* Provides options for a choice.
*
* @template T
* The type of the answers.
*/
interface ChoiceOptions<T extends Answers = Answers> extends ChoiceBase {
interface ChoiceOptions extends ChoiceBase {
/**

@@ -360,3 +369,3 @@ * @inheritdoc

*/
interface ListChoiceOptions<T extends Answers = Answers> extends ChoiceOptions<T> {
interface ListChoiceOptions<T extends Answers = Answers> extends ChoiceOptions {
/**

@@ -383,7 +392,4 @@ * A value indicating whether the choice is disabled.

* Provides options for a choice of the `ExpandPrompt`.
*
* @template T
* The type of the answers.
*/
interface ExpandChoiceOptions<T extends Answers = Answers> extends ChoiceOptions<T> {
interface ExpandChoiceOptions extends ChoiceOptions {
/**

@@ -398,3 +404,3 @@ * The key to press for selecting the choice.

*/
interface SeparatorOptions {
interface SeparatorOptions extends ChoiceBase {
/**

@@ -419,3 +425,3 @@ * Gets the type of the choice.

Choice: Choice<T>;
ChoiceOptions: ChoiceOptions<T>;
ChoiceOptions: ChoiceOptions;
SeparatorOptions: SeparatorOptions;

@@ -452,3 +458,3 @@ Separator: Separator;

interface ExpandChoiceMap<T extends Answers = Answers> extends BaseChoiceMap<T> {
ExpandChoiceOptions: ExpandChoiceOptions<T>;
ExpandChoiceOptions: ExpandChoiceOptions;
}

@@ -472,6 +478,9 @@

*
* @template TAnswers
* The type of the answers.
*
* @template TChoiceMap
* The choice-types to provide.
*/
type DistinctChoice<TChoiceMap> =
type DistinctChoice<TAnswers extends Answers = Answers, TChoiceMap = AllChoiceMap<TAnswers>> =
string |

@@ -482,4 +491,7 @@ TChoiceMap[keyof TChoiceMap];

* Represents a set of choices.
*
* @template T
* The type of the answers.
*/
type ChoiceCollection<T extends Answers = Answers> = Array<DistinctChoice<AllChoiceMap>>;
type ChoiceCollection<T extends Answers = Answers> = Array<DistinctChoice<AllChoiceMap<T>>>;

@@ -486,0 +498,0 @@ /**

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

import inquirer = require('../..');
import { Answers, CheckboxChoiceOptions, ExpandChoiceOptions, ListChoiceOptions } from "../..";

@@ -9,6 +9,6 @@ /**

*/
declare class Choice<T extends inquirer.Answers = inquirer.Answers> implements
inquirer.ListChoiceOptions<T>,
inquirer.CheckboxChoiceOptions<T>,
inquirer.ExpandChoiceOptions<T> {
declare class Choice<T extends Answers = Answers> implements
ListChoiceOptions<T>,
CheckboxChoiceOptions<T>,
ExpandChoiceOptions {
/**

@@ -15,0 +15,0 @@ * @inheritdoc

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

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

@@ -11,3 +11,3 @@ import Separator = require("./separator");

*/
type DistinctChoice<T> = inquirer.AllChoiceMap<T>[keyof inquirer.AllChoiceMap<T>];
type DistinctChoice<T> = AllChoiceMap<T>[keyof AllChoiceMap<T>];

@@ -28,3 +28,3 @@ /**

*/
type ChoiceProperty<T> = inquirer.KeyUnion<inquirer.UnionToIntersection<RealChoice<T>>>;
type ChoiceProperty<T> = KeyUnion<UnionToIntersection<RealChoice<T>>>;

@@ -37,3 +37,3 @@ /**

*/
declare class Choices<T extends inquirer.Answers = inquirer.Answers> {
declare class Choices<T extends Answers = Answers> {
/**

@@ -40,0 +40,0 @@ * The number of selectable choices.

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

import inquirer = require("../..");
import { SeparatorOptions } from "../..";

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

*/
declare class Separator implements inquirer.ChoiceBase, inquirer.SeparatorOptions {
declare class Separator implements SeparatorOptions {
/**

@@ -9,0 +9,0 @@ * @inheritdoc

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

@@ -8,3 +8,3 @@

*/
type Question = inquirer.ConfirmQuestionOptions<inquirer.Answers>;
type Question = ConfirmQuestionOptions;

@@ -30,3 +30,3 @@ /**

*/
constructor(questions: TQuestion, readLine: ReadlineInterface, answers: inquirer.Answers);
constructor(questions: TQuestion, readLine: ReadlineInterface, answers: Answers);

@@ -33,0 +33,0 @@ /**

@@ -79,5 +79,5 @@ import Prompt = require("./base");

*/
protected onKeyPress(): void;
protected onKeypress(): void;
}
export = InputPrompt;
import Prompt = require("./base");
import inquirer = require("../..");
import { Answers, ListQuestionOptions } from "../..";
import Paginator = require("../utils/paginator");

@@ -9,3 +9,3 @@ import { Interface as ReadlineInterface } from "readline";

*/
type Question = inquirer.ListQuestionOptions<inquirer.Answers>;
type Question = ListQuestionOptions;

@@ -51,3 +51,3 @@ /**

*/
constructor(question: TQuestion, readLine: ReadlineInterface, answers: inquirer.Answers);
constructor(question: TQuestion, readLine: ReadlineInterface, answers: Answers);

@@ -54,0 +54,0 @@ /**

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

@@ -8,3 +8,3 @@

*/
type Question = inquirer.NumberQuestionOptions<inquirer.Answers>;
type Question = NumberQuestionOptions;

@@ -30,5 +30,5 @@ /**

*/
constructor(question: TQuestion, readLine: ReadlineInterface, answers: inquirer.Answers);
constructor(question: TQuestion, readLine: ReadlineInterface, answers: Answers);
}
export = NumberPrompt;

@@ -63,3 +63,3 @@ import Prompt = require("./base");

*/
protected onKeyPress(): void;
protected onKeypress(): void;

@@ -66,0 +66,0 @@ /**

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

import inquirer = require("../..");
import { Answers, DistinctQuestion, KeyUnion, UnionToIntersection } from "../..";
import { Observable } from "rxjs";

@@ -7,10 +7,5 @@

*/
type QuestionProperty = inquirer.KeyUnion<inquirer.UnionToIntersection<inquirer.DistinctQuestion>>;
type QuestionProperty = KeyUnion<UnionToIntersection<DistinctQuestion>>;
/**
* Unpacks a question-property.
*/
type UnpackQuestionProperty<T> = T extends inquirer.AsyncDynamicQuestionProperty<inquirer.Answers, infer U> ? (U extends Promise<infer U2> ? U2 : U) : T;
/**
* Fetches a property of the specified `question`.

@@ -31,6 +26,6 @@ *

export function fetchAsyncQuestionPropertyQuestionProperty(
question: inquirer.DistinctQuestion,
question: DistinctQuestion,
prop: QuestionProperty,
answers: inquirer.Answers): Observable<inquirer.DistinctQuestion>;
answers: Answers): Observable<DistinctQuestion>;
export { };
{
"name": "@types/inquirer",
"version": "7.3.1",
"version": "7.3.2",
"description": "TypeScript definitions for inquirer",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/inquirer",
"license": "MIT",

@@ -75,4 +76,4 @@ "contributors": [

},
"typesPublisherContentHash": "0cf6d17bbc6a72aeea23eba9fe74241d05b5fb4a8d314eb43f36c606518ccbae",
"typeScriptVersion": "3.3"
"typesPublisherContentHash": "c339e9361e61acb48dfee1d0846619dc673dfece5b53d2b5e3ebcd7ddd6547bf",
"typeScriptVersion": "3.6"
}

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

### Additional Details
* Last updated: Thu, 20 Aug 2020 06:31:57 GMT
* Last updated: Sat, 19 Jun 2021 14:31:09 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