Skip to content

Commit

Permalink
fixed ambiguous overload
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Jan 4, 2025
1 parent 0e1055f commit 94d81b6
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions src/Vscode.hx
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ extern class VscodeWindow {
*/
function createTextEditorDecorationType(options:DecorationRenderOptions):TextEditorDecorationType;


/**
* Show an information message to users. Optionally provide an array of items which will be presented as
* clickable buttons.
Expand All @@ -675,7 +676,16 @@ extern class VscodeWindow {
* @param items A set of items that will be rendered as actions in the message.
* @returns A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
overload function showInformationMessage(message:String, items:Rest<String>):Thenable<Null<String>>;
// /**
// * Show an information message.
// *
// * @see {@link window.showInformationMessage showInformationMessage}
// *
// * @param message The message to show.
// * @param items A set of items that will be rendered as actions in the message.
// * @returns A thenable that resolves to the selected item or `undefined` when being dismissed.
// */
overload function showInformationMessage<T:EitherType<String, MessageItem>>(message:String, items:Rest<T>):Thenable<Null<T>>;

/**
* Show an information message to users. Optionally provide an array of items which will be presented as
Expand All @@ -686,30 +696,17 @@ extern class VscodeWindow {
* @param items A set of items that will be rendered as actions in the message.
* @returns A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
overload function showInformationMessage(message:String, options:MessageOptions, items:Rest<String>):Thenable<Null<String>>;

/**
* Show an information message.
*
* @see {@link window.showInformationMessage showInformationMessage}
*
* @param message The message to show.
* @param items A set of items that will be rendered as actions in the message.
* @returns A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
overload function showInformationMessage<T:MessageItem>(message:String, items:Rest<T>):Thenable<Null<T>>;

/**
* Show an information message.
*
* @see {@link window.showInformationMessage showInformationMessage}
*
* @param message The message to show.
* @param options Configures the behaviour of the message.
* @param items A set of items that will be rendered as actions in the message.
* @returns A thenable that resolves to the selected item or `undefined` when being dismissed.
*/
overload function showInformationMessage<T:MessageItem>(message:String, options:MessageOptions, items:Rest<T>):Thenable<Null<T>>;
// /**
// * Show an information message.
// *
// * @see {@link window.showInformationMessage showInformationMessage}
// *
// * @param message The message to show.
// * @param options Configures the behaviour of the message.
// * @param items A set of items that will be rendered as actions in the message.
// * @returns A thenable that resolves to the selected item or `undefined` when being dismissed.
// */
overload function showInformationMessage<T:EitherType<String, MessageItem>>(message:String, options:MessageOptions, items:Rest<T>):Thenable<Null<T>>;

/**
* Show a warning message.
Expand Down

0 comments on commit 94d81b6

Please sign in to comment.