html
<div id="light">ㅎ하하</div>
ts
const $light = document.querySelector('#light')
if ($light != null) $light.style.backgroundColor = 'yellow';
이런식으로 css 조작을 해봤는데 ts에서는 style 부분에 빨간색 밑줄쳐지면서 'Element' 형식에 'style' 속성이 없다고 뜨는데 컴파일 해서 봐보면 변경되긴 하더라구요.
css 조작할 때 위 에러는 어떻게 할 수 없는 건가요??