Fixup type errors
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user