Issue #3436255 by mondrake, longwave: Fix return typehinting for Compiler and EventSubscriber related classes