It is possible to get a value directly from an input element without using an intermediate variable.
First in the event arguments add
e: Event
.
Then simply do const value = (<HTMLInputElement>e.target).value
which will cast the target as an input element (or whatever you want) that allows you to do .value
. Easy!