Skip to main content

Function: showInputBox()

showInputBox(options?, token?): Promise<string | undefined>

Opens an input box to ask the user for input.

The returned value will be undefined if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK.

Parameters

options?: InputBoxOptions

Configures the behavior of the input box.

token?: CancellationToken

A token that can be used to signal cancellation.

Returns

Promise<string | undefined>

A promise that resolves to a string the user provided or to undefined in case of dismissal.

Defined in

packages/extension-api/src/extension-api.d.ts:2249