In my React component I have the following input element:
<input
max={120}
type="number"
value={numValue}
onKeyDown={handleKeyDown}
/>
And this is my handleKeyDown function:
const handleKeyDown = (evt: KeyboardEvent) => {
console.log(evt.key);
console.log(evt.target.value);
}
And this is the error I get from TypeScript
Property 'value' does not exist on type 'EventTarget'.
What is the event type I need to assign so that it covers both the evt.target.value and the evt.key ?