This repository was archived by the owner on Apr 12, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork27.4k
feat(Angular.js): add externs file for Closure Compiler#4722
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
feat(Angular.js): add externs file for Closure Compiler
This adds an (incomplete) externs file for use with the Closure Compiler. Userscan pass this as -extern to the compiler pass to get type checking and protecttheir AngularJS use against property renaming in advanced compilation mode.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit3ccec13aa702d9a7f75316df0c70873d72148b24
There are no files selected for viewing
14 changes: 14 additions & 0 deletionsclosure/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
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/ |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.