Reputation: 51
I have not been able to find out why this error is occurring and no one else seem to share my error, any insights? This is my first using TypeScript.
Tell me if you need more information or coding examples.
Upvotes: 1
Views: 139
Reputation: 970
Is it a .tsx
file? If so, it might be a parsing issue - <HTMLInputElement>
is recognized as an opening React tag instead of a TS type casting expression. Try working it around with the as
casting:
(document.getElementById('ulvl') as HTMLInputElement).value
Upvotes: 1