@types/prompts
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -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>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5548
72