The linked externs extractor does not seem to be able to extract externs from jQuery style files. This is most likely because jQuery uses the extend method to assign objects, and this tool does not recognize that these properties must also be externed.
To solve this problem, you need to unravel the extension calls into direct destinations:
jQuery.extend(jQuery.ui, { prop1: function() {}, prop2: function() {});
Would become
jQuery.ui = jQuery.ui || {}; jQuery.ui.prop1 = function() {}; jQuery.ui.prop2 = function() {};
In addition, when working with jQuery and using advanced optimizations, you should completely eliminate the $ alias.
This is just one of the reasons why the complexity of compiling jQuery code with the advanced optimization of the Closure compiler is difficult.
source share