I found a similar discussion in the typescript issue queue which says in this case a type assertion is probably unavoidable:
Basically EventTarget is the most general type, of which Element is a subtype, and HTMLElement is a subtype of that. If you get back a thing from the DOM, we generally have no idea which it is, and you should add a type assertion to “add in” the specific external knowledge that you have about the structure of your particular DOM layout.
It’s possible, for example, that the .target of an event is not an Element (you can add event listeners to XMLHttpRequest, for example, and XMLHttpRequest does not have a getBoundingClientRect method).
So because target may or may not be a Node like I want, TS can’t infer the truth, and I need to assert.
contains(e.target as Node) appears to be the right solution.