This will not work if the function is called from i.e. an onChange proeperty handler reference in React code though. The react handler does not expect the type to be set for the React.ChangeEvent and will show a typing error. I had to revert to (a variant of) the selected answer instead, with a cast: (event.target as HTMLInputElement).value. –
SpiralisNov
This will not work if the function is called from i.e. an onChange proeperty handler reference in React code though. The react handler does not expect the type to be set for the React.ChangeEvent and will show a typing error. I had to revert to (a variant of) the selected answer instead, with a cast: (event.target as HTMLInputElement).value. – Spiralis Nov