useThrottle and useThrottledCallback take edges: ('leading' | 'trailing')[], while useDebounce, useDebouncedCallback, useDebouncedValue and useThrottledValue take leading and trailing booleans. useThrottledValue even converts its booleans back into an array just to call useThrottle.
Replace edges with leading?: boolean and trailing?: boolean in both hooks, keep the current default of both enabled, and remove the conversion in useThrottledValue. Update types, docs, and tests.
Waits for #530.
useThrottleanduseThrottledCallbacktakeedges: ('leading' | 'trailing')[], whileuseDebounce,useDebouncedCallback,useDebouncedValueanduseThrottledValuetakeleadingandtrailingbooleans.useThrottledValueeven converts its booleans back into an array just to calluseThrottle.Replace
edgeswithleading?: booleanandtrailing?: booleanin both hooks, keep the current default of both enabled, and remove the conversion inuseThrottledValue. Update types, docs, and tests.Waits for #530.