beezee/djax — Issue #11: Create externs file for djax function
Author: GaryJones
Created: 2012-03-07 15:24:21+00:00
State: open

```
/**
* @fileoverview Externs for jQuery djax plugin
*
* @externs
*/

/**
* @param {string} selector
* @param {Array.=} exceptions
* @return {jQuery}
*/
jQuery.prototype.djax = function (selector, exceptions) {};
```

I believe the above, saved into a new file `jquery.djax.externs.js` in your repo, will allow Closure Compiler config blocks on JS files that call `djax()`, to be able to be compiled without losing reference to the function name.

e.g.

```
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @output_file_name foobar-djax.js
// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/jquery-1.7.js
// @externs_url https://raw.github.com/beezee/djax/master/jquery.djax.externs.js
// ==/ClosureCompiler==
// http://closure-compiler.appspot.com/home
```