What is the DOM? DOM (Document Object Model) is a tree-like structure that holds information about how an HTML (or XML) page is structured. Each individual node in the tree represents an element on a web page. In Javascript, DOM can be accessed and m...

Markdown supported · ⌘↵ to post
raddevus
Software Developer Team Lead with 30 years of development experience.
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');