YK
function handleInput(e: KeyboardEvent) {
if (e.key === 'Enter') {
dispatch('enter');
return;
}
}
Error: Type '(e: KeyboardEvent) => void' is not assignable to type 'EventHandler<Event, HTMLInputElement>'.
Types of parameters 'e' and 'event' are incompatible.
Type 'Event & { currentTarget: EventTarget & HTMLInputElement; }' is missing the following properties from type 'KeyboardEvent': altKey, char, charCode, code, and 16 more. (ts)
on:keyup={handleInput}
on:change={handleInput}
bind:value={p.quantity}
}