How to call handler in a different context

In JavaScript (and other languages) “this” refers to the context in which a method is called. I am trying to bind an event handler to an object, but I cannot even compile the code, because the compiler assumes “this” refers to the component. And since it cannot find this.whateverProperty I refer to, defined on the component class, the build fails. To me, this is a failure of the compiler, since it cannot be known what “this” will refer to at compile time.

How do I get around this?