Skip to main content

modalAPI

MS Code Extension API


MS Code Extension API / core/extensionAPI/modules/window/modalAPI

core/extensionAPI/modules/window/modalAPI

Functions

createModalAPI()

createModalAPI(): object

Defined in: core/extensionAPI/modules/window/modalAPI.ts:9

Factory function to create the Modal API. Provides a way to show standardized modal dialogs to the user.

Returns

showModalDialog

showModalDialog: (options) => Promise<string | null>

Displays a modal dialog and returns a promise that resolves when the user interacts with it.

Parameters
options

ModalOptions

Configuration for the modal (title, message, buttons, etc.).

Returns

Promise<string | null>

A promise resolving to the ID of the clicked button or null if dismissed.