Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
/angular.jsPublic archive

Commit3ccec13

Browse files
committed
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.
1 parent43d4901 commit3ccec13

File tree

2 files changed

+1733
-0
lines changed

2 files changed

+1733
-0
lines changed

‎closure/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This file contains externs for use with the Closure compiler (aka JSCompiler).
2+
Passing these files to the --externs parameter of a compiler pass allows using
3+
type annotations for AngularJS objects. For example, Angular's $scope objects
4+
can be annotated as:
5+
/**@type {angular.Scope}*/ var scope = $scope;
6+
7+
This allows JSCompiler to type check accesses to scope, give warnings about
8+
missing methods or incorrect arguments, and also prevents renaming of property
9+
accesses with advanced compilation.
10+
11+
The externs are incomplete and maintained on an as-needed basis, but strive to
12+
be correct. Externs for individual modules should be added in separate files.
13+
14+
Seehttps://developers.google.com/closure/compiler/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp