'hook_entity_operation_alter', but for users I'd like to customise the Operations dropdowns on /admin/people

The documentation for hook_entity_operation_alter() says the second parameter should be: 

\Drupal\Core\Entity\EntityInterface $entity:

However when I do:

function mymodule_entity_operation_alter(array &amp;$operations, EntityInterface $entity) {
    kint( $entity );
}


I get:


  Argument 2 passed to mymodule_entity_operation_alter() must be an instance of EntityInterface, instance of Drupal\user\Entity\User given


Is there anything else I can use?
mymodule.module also needs:

use Drupal\Core\Entity\EntityInterface;


Credits to drupality, who first mentioned this in a comment below my question