// index.html
<h4 id="title">안녕하세요</h4>
<a href="naver.com">링크</a>
<button id="button">버튼</button>
<script src="변환된 자바스크립트파일.js"></script>
let 제목 = document.querySelector('#title');
if (제목 != null) {
제목.innerHTML = '반갑습니다'
}
let 제목 = document.querySelector('#title');
if (제목 instanceof HTMLElement) {
제목.innerHTML = '반갑습니다'
}
let 제목 = document.querySelector('#title') as HTMLElement;
제목.innerHTML = '반갑습니다'
let 제목 = document.querySelector('#title');
if (제목?.innerHTML != undefined) {
제목.innerHTML = '반갑습니다'
}