Types
This commit is contained in:
parent
8553960ce6
commit
735b8206ce
|
@ -55,7 +55,7 @@ export const sequential = <
|
||||||
* @returns a debounced version of the callback
|
* @returns a debounced version of the callback
|
||||||
*/
|
*/
|
||||||
export const debounce = (callback: Function, minDelay = 1000) => {
|
export const debounce = (callback: Function, minDelay = 1000) => {
|
||||||
let timeout: NodeJS.Timeout
|
let timeout: ReturnType<typeof setTimeout>
|
||||||
return async (...params: any[]) => {
|
return async (...params: any[]) => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
|
|
Loading…
Reference in New Issue