Fixup type errors

This commit is contained in:
Eoghan Murray
2026-04-01 12:00:00 +08:00
parent 29d0d3a659
commit 58ee89dd36

View File

@@ -230,7 +230,7 @@ function initMouseInteractionObserver({
: sampling.mouseInteraction;
const handlers: listenerHandler[] = [];
let currentPointerType = null;
let currentPointerType: PointerTypes | null = null;
const getHandler = (eventKey: keyof typeof MouseInteractions) => {
return (event: MouseEvent | TouchEvent | PointerEvent) => {
const target = getEventTarget(event) as Node;
@@ -241,7 +241,7 @@ function initMouseInteractionObserver({
let e = event;
if ('pointerType' in e) {
Object.keys(PointerTypes).forEach(
(pointerKey: keyof typeof PointerKeys) => {
(pointerKey: keyof typeof PointerTypes) => {
if ((e as PointerEvent).pointerType === pointerKey.toLowerCase()) {
pointerType = PointerTypes[pointerKey];
return;