|
@ -7,7 +7,7 @@ export const debounce = (func: Function, wait: number): Function => { |
|
|
timeout = setTimeout(() => func.apply(this, args), wait); |
|
|
timeout = setTimeout(() => func.apply(this, args), wait); |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// Throttle
|
|
|
// Throttle
|
|
|
export const throttle = (func: Function, wait: number): Function => { |
|
|
export const throttle = (func: Function, wait: number): Function => { |
|
|
let timeout: any; |
|
|
let timeout: any; |
|
|