I'm using Flow to typecheck my app.
I have a dom node I have to pull manually using document.querySelector. In Flow's eyes, this returns an HTMLElement. It's actually returning a video element, which I typecheck as HTMLVideoElement.
I'm trying to cast it, but it still errors out. What am I doing wrong?
let videoElement: HTMLVideoElement;
videoElement = document.querySelector('video') // type is HTMLElement, errors out.
<video class="lol"></video>
The error I get is This type is incompatible with
HTMLVideoElement.