Introduce IRenderDebouncer interface, unifying RenderDebouncer and TimeBasedDebouncer types

This commit is contained in:
Samuel Sampson
2021-08-17 20:50:47 +00:00
parent f1eed44e14
commit f1849cafaf
5 changed files with 12 additions and 8 deletions
+2 -2
View File
@@ -5,12 +5,12 @@
const RENDER_DEBOUNCE_THRESHOLD_MS = 1000; // 1 Second
import { IDisposable } from 'common/Types';
import { IRenderDebouncer } from 'browser/Types';
/**
* Debounces calls to update screen readers to update at most once per second.
*/
export class TimeBasedDebouncer implements IDisposable {
export class TimeBasedDebouncer implements IRenderDebouncer {
private _rowStart: number | undefined;
private _rowEnd: number | undefined;
private _rowCount: number | undefined;