Skip to content

Commit

Permalink
fix(types): add missing bindClickHandler()
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Sep 26, 2023
1 parent 5445589 commit 59a9613
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/staticMethods/timer.js
Expand Up @@ -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
}
Expand Down
20 changes: 18 additions & 2 deletions sweetalert2.d.ts
Expand Up @@ -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:
*
* ```
* <button data-swal-template="#hello-world-alert">Click me!</button>
*
* <template id="hello-world-alert">
* <swal-title>Hello world!</swal-title>
* <swal-html>Here I come...</swal-html>
* </template>
* ```
*
* @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.
Expand Down

0 comments on commit 59a9613

Please sign in to comment.