This is caused by the IDE not knowing what type you're passing in.
There's a third-party package to help with this.
Annotations are generally the way to solve your issue.