You might want to have a look at ST-JS. This tool allows you to write javascript, but borrowing the syntax and static typing of java. The tools provides a bunch of Java interfaces and classes that acurately reflect the standard javascript library, plus some other common useful libraries (DOM, jquery, etc...). You can then write your source code in java, and the ST-JS translater will transform that static-typed code into plain vanilla (and most importantly readable) javascript code. ST-JS is also compatible with any other javascript library that you would want to use, as long as you write the corresponding java interfaces.
Another advantage of ST-JS, is that since you are writing java code, you can use all the really powerful tools from the java ecosystem. Refactoring tools in all IDEs will work out of the box. Static analysis tools such as Findbugs, PWD, checkstyle also work great and are very accurate on ST-JS enabled code.
You can think of ST-JS as being somewhere in the middle between GWT (completely hides the javascript standard libraries from you, and prevents you from using external libraries) and some javascript static analysis tools such as JSLint.