Update type definitons to SweetAlert 1.0.1

This commit is contained in:
Markus Peloso
2015-05-23 11:41:46 +02:00
parent 83ae1f8dd6
commit 978b3e6c74
2 changed files with 14 additions and 4 deletions
+6 -2
View File
@@ -63,7 +63,10 @@ swal({
text: "I will close in 2 seconds.",
timer: 2000,
showConfirmButton: false
});
},
function () {
swal("Time Out!", "The time is out of joint.", "success");
});
// A replacement for the "prompt" function
swal({
@@ -73,7 +76,8 @@ swal({
showCancelButton: true,
closeOnConfirm: false,
animation: "slide-from-top",
inputPlaceholder: "Write something"
inputPlaceholder: "Write something plx",
inputValue: "Write something"
},
function (inputValue) {
if (inputValue === false) return false;
+8 -2
View File
@@ -1,4 +1,4 @@
// Type definitions for SweetAlert 1.0.0-beta
// Type definitions for SweetAlert 1.0.1
// Project: https://github.com/t4t5/sweetalert/
// Definitions by: Markus Peloso <https://github.com/ToastHawaii/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -97,7 +97,7 @@ declare module SweetAlert {
imageSize?: string;
/**
* Auto close timer of the modal.Set in ms (milliseconds).
* Auto close timer of the modal. Set in ms (milliseconds).
* Default: null
*/
timer?: number;
@@ -125,6 +125,12 @@ declare module SweetAlert {
* Default: null
*/
inputPlaceholder?: string;
/**
* Specify a default text value that you want your input to show when using type: "input"
* Default: null
*/
inputValue?: string;
}
interface Settings extends SettingsBase {