After updating my Angular project to the latest version using the official upgrade guide found here, I encountered an error when running 'ng serve' in the project directory.
"ERROR in src/app/menu/menu-tree.component.ts(93,63): error TS2339: Property 'localName' does not exist on type 'Node'.
Upon investigation, I located the definition of the Node type in lib.dom.d.ts (located at C:\Users\my_user\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\lib.dom.d.ts).
Here is the code snippet causing the issue:
if ( mutation.type === 'childList' && mutation.target.localName === 'span' &&
mutation.addedNodes.length > 0 && mutation.removedNodes.length === 0) {
The 'target' property is defined within the interface MutationRecord in lib.dom.d.ts:
readonly target: Node;