What is the TypeScript definition for the onWheelCapture event in React?

The right interface for onWheelCapture is WheelEvent

Please continue reading below to see how to use it or read my guide on using React's events with TypeScript.

Interface

interface WheelEvent<T = Element> extends MouseEvent<T, NativeWheelEvent> {
    deltaMode: number;
    deltaX: number;
    deltaY: number;
    deltaZ: number;
}

Full example

import React, { WheelEvent } from 'react';

const App = () => {
  const handleWheelEvent = (e: WheelEvent<HTMLDivElement>) => {
    // Do something
  };

  return <div onWheelCapture={handleWheelEvent}>{/** Some code */}</div>;
};

export default App;

Attributes that use WheelEvent: