angular.js/closure
Jeff Cross bcca80548d feat($attrs): add $attrs.$attr to externs so that it isn't renamed
This fixes the issue that any usage of $attr is broken after js compilation.
2013-11-26 18:34:11 -08:00
..
angular.js feat($attrs): add $attrs.$attr to externs so that it isn't renamed 2013-11-26 18:34:11 -08:00
README.md feat(Angular.js): add externs file for Closure Compiler 2013-10-30 15:15:03 -07:00

This file contains externs for use with the Closure compiler (aka JSCompiler). Passing these files to the --externs parameter of a compiler pass allows using type annotations for AngularJS objects. For example, Angular's $scope objects can be annotated as:

/** @type {angular.Scope} */
var scope = $scope;

This allows JSCompiler to type check accesses to scope, give warnings about missing methods or incorrect arguments, and also prevents renaming of property accesses with advanced compilation.

The externs are incomplete and maintained on an as-needed basis, but strive to be correct. Externs for individual modules should be added in separate files.

See https://developers.google.com/closure/compiler/