From 0c412f77490613cdb08f76719eaffaef6f2cffae Mon Sep 17 00:00:00 2001 From: Jouderian Nobre Date: Thu, 30 Nov 2017 01:18:07 -0300 Subject: [PATCH] [Inquirer] Add missing attributes for Question type --- types/inquirer/index.d.ts | 9 +++++++++ types/inquirer/inquirer-tests.ts | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/types/inquirer/index.d.ts b/types/inquirer/index.d.ts index 2a0b9f60f4..32c54fa99e 100644 --- a/types/inquirer/index.d.ts +++ b/types/inquirer/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/SBoudrias/Inquirer.js // Definitions by: Qubo // Parvez +// Jouderian // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -115,6 +116,14 @@ declare namespace inquirer { * Add a mask when password will entered */ mask?: string; + /** + * Change the default prefix message. + */ + prefix?: string; + /** + * Change the default suffix message. + */ + suffix?: string; } /** diff --git a/types/inquirer/inquirer-tests.ts b/types/inquirer/inquirer-tests.ts index d3591b13d2..4a43dcc98e 100644 --- a/types/inquirer/inquirer-tests.ts +++ b/types/inquirer/inquirer-tests.ts @@ -151,13 +151,15 @@ var questions = [ { type: "input", name: "first_name", - message: "What's your first name" + message: "What's your first name", + prefix: "1 - ", }, { type: "input", name: "last_name", message: "What's your last name", - default: function () { return "Doe"; } + default: function () { return "Doe"; }, + suffix: "!!" }, { type: "input",