diff --git a/sweetalert/sweetalert-tests.ts b/sweetalert/sweetalert-tests.ts index 9523bc010..ca0faacbf 100644 --- a/sweetalert/sweetalert-tests.ts +++ b/sweetalert/sweetalert-tests.ts @@ -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; diff --git a/sweetalert/sweetalert.d.ts b/sweetalert/sweetalert.d.ts index 108e2b906..61b643c32 100644 --- a/sweetalert/sweetalert.d.ts +++ b/sweetalert/sweetalert.d.ts @@ -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 // 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 {