Are you sure this code works?
const app = document.querySelector<HTMLDivElement>('#app')!;
I think you need to remove <HTMLDivElement> & the ! right before the semicolon.
I think it is supposed to be:
const app = document.querySelector('#app');
raddevus