chore(scroll): typed alias for wrapped wheel handler

onMouseEvent is untyped on ScrollBoxRenderable.prototype; cast once
at capture instead of loosening call sites.
This commit is contained in:
2026-09-06 18:46:42 -04:00
parent a3641d100e
commit 06c5cc9184

View File

@@ -19,7 +19,9 @@ import type { MouseEvent } from "@opentui/core";
type ScrollDir = "up" | "down" | "left" | "right"; type ScrollDir = "up" | "down" | "left" | "right";
// The scrollbox's own wheel handler (scrolls, then bubbles to its parent). // The scrollbox's own wheel handler (scrolls, then bubbles to its parent).
const original = ScrollBoxRenderable.prototype.onMouseEvent; const original = (ScrollBoxRenderable.prototype as unknown as {
onMouseEvent: (event: MouseEvent) => void;
}).onMouseEvent;
let installed = false; let installed = false;