Socket
Socket
Sign inDemoInstall

@types/prompts

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/prompts - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

16

prompts/index.d.ts

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

// Type definitions for prompts 1.1
// Type definitions for prompts 1.2
// Project: https://github.com/terkelg/prompts
// Definitions by: Berkay GURSOY <https://github.com/Berkays>
// Daniel Perez Alvarez <https://github.com/danielpa9708>
// Kamontat Chantrachirathumrong <https://github.com/kamontat>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -50,14 +51,15 @@ // TypeScript Version: 2.8

value: string;
disable?: boolean;
}
interface Options {
onSubmit: (prompt: PromptObject, answer: any, answers: any[]) => void;
onCancel: (prompt: PromptObject, answers: any) => void;
onSubmit?: (prompt: PromptObject, answer: any, answers: any[]) => void;
onCancel?: (prompt: PromptObject, answers: any) => void;
}
interface PromptObject<T extends string = string> {
type: ValueOrFunc<string>;
type: ValueOrFunc<PromptType> | Falsy;
name: ValueOrFunc<T>;
message?: ValueOrFunc<string>;
initial?: string;
initial?: string | number | boolean;
style?: string;

@@ -89,3 +91,7 @@ format?: PrevCaller<T, void>;

type Falsy = false | null | undefined;
type PromptType = "text" | "password" | "invisible" | "number" | "confirm" | "list" | "toggle" | "select" | "multiselect" | "autocomplete";
type ValueOrFunc<T extends string> = T | PrevCaller<T>;
}
{
"name": "@types/prompts",
"version": "1.1.1",
"version": "1.2.0",
"description": "TypeScript definitions for prompts",

@@ -16,2 +16,7 @@ "license": "MIT",

"githubUsername": "danielpa9708"
},
{
"name": "Kamontat Chantrachirathumrong",
"url": "https://github.com/kamontat",
"githubUsername": "kamontat"
}

@@ -27,4 +32,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "0d4363e91f5ea906385ffe1d3500f79124f6b1bcc79c5fb91603a3bf5c34a4cb",
"typesPublisherContentHash": "99ff037d10266f8bbc273f9d239bb6c5fb81f2faeb4b50f61f93d868b1160858",
"typeScriptVersion": "2.8"
}

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

Additional Details
* Last updated: Thu, 08 Nov 2018 21:32:15 GMT
* Last updated: Sat, 15 Dec 2018 00:54:45 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Berkay GURSOY <https://github.com/Berkays>, Daniel Perez Alvarez <https://github.com/danielpa9708>.
These definitions were written by Berkay GURSOY <https://github.com/Berkays>, Daniel Perez Alvarez <https://github.com/danielpa9708>, Kamontat Chantrachirathumrong <https://github.com/kamontat>.
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