Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 34x 84x 84x 34x 293x 293x | export function isMouseEvent( event: MouseEvent | TouchEvent | PointerEvent ): event is MouseEvent { // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check. Iif (typeof PointerEvent !== "undefined" && event instanceof PointerEvent) { return !!(event.pointerType === "mouse") } return event instanceof MouseEvent } export function isTouchEvent( event: MouseEvent | TouchEvent | PointerEvent ): event is TouchEvent { const hasTouches = !!(event as TouchEvent).touches return hasTouches } |