Hi Xorik,
Feels like a bug, this seems to be a factor of typescript strict function type and strict null checking. Excalibur as a project pre-dates this typescript compiler feature, in fact we probably would have noticed this when we implemented this
https://github.com/excaliburjs/Excalibur/issues/1143.

As a temporary workaround, disabling this check in the tsconfig.json removes the error, however this is definitely unideal if contravariant functions and strict null check types are important to you.

One other workaround to capture the appropriate type due to strict null checks in the handler, and add a typeguard.
I've opened an issue in excalibur to address this issue specifically
Thanks for asking! We'll get this sorted.
Erik