mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Bootbox: improve typing with string union types (#14561)
This commit is contained in:
committed by
Mohamed Hegazy
parent
37f8604200
commit
43b17712ec
@@ -6,7 +6,7 @@ bootbox.alert("Are we ok with callback?", function () {
|
||||
console.log("Callback called!");
|
||||
});
|
||||
bootbox.alert({
|
||||
size: "medium",
|
||||
size: "small",
|
||||
message: "Are we ok with callback and custom button?",
|
||||
callback: function () {
|
||||
console.log("Callback called!");
|
||||
|
||||
Vendored
+3
-2
@@ -15,7 +15,8 @@ interface BootboxBaseOptions {
|
||||
closeButton?: boolean;
|
||||
animate?: boolean;
|
||||
className?: string;
|
||||
size?: string;
|
||||
/** All other values result in medium */
|
||||
size?: "small" | "large";
|
||||
buttons?: BootboxButtonMap; // complex object where each key is of type BootboxButton
|
||||
}
|
||||
|
||||
@@ -40,7 +41,7 @@ interface BootboxConfirmOptions extends BootboxDialogOptions {
|
||||
interface BootboxPromptOptions extends BootboxBaseOptions {
|
||||
title: string;
|
||||
value?: string;
|
||||
inputType?: string;
|
||||
inputType?: "text" | "textarea" | "email" | "select" | "checkbox" | "date" | "time" | "number" | "password";
|
||||
callback: (result: string) => any;
|
||||
buttons?: BootboxConfirmPromptButtonMap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user