From 06c5cc9184fa8247d73cb342f8a019102a9258fe Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Sun, 6 Sep 2026 18:46:42 -0400 Subject: [PATCH] chore(scroll): typed alias for wrapped wheel handler onMouseEvent is untyped on ScrollBoxRenderable.prototype; cast once at capture instead of loosening call sites. --- src/utils/nested-scroll.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/nested-scroll.ts b/src/utils/nested-scroll.ts index 35a0659..64c97e2 100644 --- a/src/utils/nested-scroll.ts +++ b/src/utils/nested-scroll.ts @@ -19,7 +19,9 @@ import type { MouseEvent } from "@opentui/core"; type ScrollDir = "up" | "down" | "left" | "right"; // 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;