it may help if you can annotate the type of the parameters and return value. For type annotation, see here: https://developers.google.com/closure/compiler/docs/js-for-compiler