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:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user