I don't think we can avoid repeating ourselves. The Closure Compiler doesn't seem to infer the types of the arguments to the returned funtion from the return type of the outer function.