cast to elementtype js code example
Example: typescript doesn't know type of HTML element
const inputField = document.getElementById('sample') as HTMLInputElement;
const submitButton = document.getElementById('sampleButton') as HTMLButtonElement;
const inputField = document.getElementById('sample') as HTMLInputElement;
const submitButton = document.getElementById('sampleButton') as HTMLButtonElement;