Skip to content

Commit a68f774

Browse files
vmikloscaolanm
authored andcommitted
browser: add type to the new deferredDrawCallback
Added in commit 823c22f (Reclaim all tile bitmaps when document loses focus, 2025-12-20), this is currently set to a non-null value at a single place, where it points to a function that takes no arguments and has no return value. Make this explicit to get rid of the 'any'. Signed-off-by: Miklos Vajna <[email protected]> Change-Id: I8e347cf4f4de1b9ae59059926deb876d70b06424
1 parent f9035a8 commit a68f774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

browser/src/canvas/CanvasSectionContainer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class CanvasSectionContainer {
196196
private drawRequest: number = null;
197197
private drawingPaused: number = 0;
198198
private drawingEnabled: boolean = true;
199-
private deferredDrawCallback: any = null;
199+
private deferredDrawCallback: () => void = null;
200200
private sectionsDirty: boolean = false;
201201
private framesRendered: number = 0; // Total frame count for debugging
202202

@@ -391,7 +391,7 @@ class CanvasSectionContainer {
391391

392392
// Drawing requests will call this callback instead of queueing a redraw. Set the
393393
// callback to null to resume the standard drawing chain.
394-
public deferDrawing (callback: any) {
394+
public deferDrawing (callback: () => void) {
395395
this.deferredDrawCallback = callback;
396396
}
397397

0 commit comments

Comments
 (0)