Please do still file an issue though. How to file an Issue
One of the goals of openhab-js is to make it so you never have to deal directly with the raw openHAB Java Objects. It really should accept a String for the groupFunction
instead of requiring you to Java.type
or pull in the function and the Java State Objects.