20 строки
403 B
Plaintext
20 строки
403 B
Plaintext
/* @flow strict */
|
|
|
|
type ThrottleOptions = {|
|
|
start?: boolean,
|
|
middle?: boolean,
|
|
once?: boolean
|
|
|}
|
|
|
|
declare export function throttle<T: $ReadOnlyArray<mixed>>(
|
|
callback: (...T) => mixed,
|
|
wait: number,
|
|
opts?: ThrottleOptions
|
|
): (...T) => void
|
|
|
|
declare export function debounce<T: $ReadOnlyArray<mixed>>(
|
|
callback: (...T) => mixed,
|
|
wait: number,
|
|
opts?: ThrottleOptions
|
|
): (...T) => void
|