diff --git a/src/staticMethods/timer.js b/src/staticMethods/timer.js index a4e6adb52..cee221bf9 100644 --- a/src/staticMethods/timer.js +++ b/src/staticMethods/timer.js @@ -53,12 +53,12 @@ export const toggleTimer = () => { * Increase timer. Returns number of milliseconds of an updated timer. * If `timer` parameter isn't set, returns undefined. * - * @param {number} n + * @param {number} ms * @returns {number | undefined} */ -export const increaseTimer = (n) => { +export const increaseTimer = (ms) => { if (globalState.timeout) { - const remaining = globalState.timeout.increase(n) + const remaining = globalState.timeout.increase(ms) animateTimerProgressBar(remaining, true) return remaining } diff --git a/sweetalert2.d.ts b/sweetalert2.d.ts index 3951e7f5e..069547cd2 100644 --- a/sweetalert2.d.ts +++ b/sweetalert2.d.ts @@ -274,9 +274,25 @@ declare module 'sweetalert2' { * Increase timer. Returns number of milliseconds of an updated timer. * If `timer` parameter isn't set, returns `undefined`. * - * @param n The number of milliseconds to add to the currect timer + * @param ms The number of milliseconds to add to the currect timer */ - function increaseTimer(n: number): number | undefined + function increaseTimer(ms: number): number | undefined + + /** + * Allows to trigger popups declaratively: + * + * ``` + * + * + * + * ``` + * + * @param attribute The attribute name to search for, defaults to `data-swal-template` + */ + function bindClickHandler(attribute: string): void /** * Determines if a given parameter name is valid.