google-closure-compiler 20161024.3.0 → 20170409.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +327 -0
- package/compiler.jar +0 -0
- package/contrib/externs/angular-1.3-resource.js +6 -0
- package/contrib/externs/angular-1.3.js +4 -3
- package/contrib/externs/angular-1.4-resource.js +6 -0
- package/contrib/externs/angular-1.4.js +2 -2
- package/contrib/externs/angular-1.5-q_templated.js +19 -1
- package/contrib/externs/angular-1.5-resource.js +6 -0
- package/contrib/externs/angular-1.5.js +44 -9
- package/contrib/externs/angular-1.6-http-promise_templated.js +61 -0
- package/contrib/externs/angular-1.6-mocks.js +267 -0
- package/contrib/externs/angular-1.6-q_templated.js +194 -0
- package/contrib/externs/angular-1.6-resource.js +332 -0
- package/contrib/externs/{w3c_css.js → angular-1.6-test.js} +8 -6
- package/contrib/externs/angular-1.6.js +2646 -0
- package/contrib/externs/angular-cache-4.6.js +316 -0
- package/contrib/externs/angular-material-1.1.js +92 -33
- package/contrib/externs/angular-material.js +36 -5
- package/contrib/externs/chai-3.5.js +101 -2
- package/contrib/externs/chrome_extensions.js +267 -95
- package/contrib/externs/jasmine-2.0.js +23 -3
- package/contrib/externs/jquery-1.4.4.js +1 -1
- package/contrib/externs/jquery-1.5.js +1 -1
- package/contrib/externs/jquery-1.6.js +1 -1
- package/contrib/externs/jquery-3.0.js +2037 -0
- package/contrib/externs/jquery-3.1.js +2045 -0
- package/contrib/externs/maps/google_maps_api_v3.js +306 -263
- package/contrib/externs/maps/google_maps_api_v3_27.js +6732 -0
- package/contrib/externs/maps/google_maps_api_v3_28.js +6637 -0
- package/contrib/externs/maps/google_maps_api_v3_exp.js +41 -106
- package/contrib/externs/mocha-2.5.js +65 -14
- package/contrib/externs/polymer-1.0.js +43 -5
- package/contrib/externs/safari.js +58 -0
- package/contrib/externs/sinon-1.17.js +719 -10
- package/contrib/externs/sinon-chai-2.7.js +78 -0
- package/contrib/externs/w3c_eventsource.js +6 -17
- package/contrib/externs/web_component_tester-4.2.js +6 -0
- package/contrib/nodejs/crypto.js +6 -6
- package/lib/gulp/index.js +2 -2
- package/lib/node/closure-compiler.js +3 -1
- package/package.json +8 -9
- package/contrib/externs/jquery-1.3.2.externs.js +0 -714
- package/contrib/externs/w3c_gamepad.js +0 -91
- package/contrib/externs/w3c_midi.js +0 -293
- package/contrib/externs/w3c_pointer_events.js +0 -105
package/README.md
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# google-closure-compiler
|
|
2
|
+
[](https://travis-ci.org/google/closure-compiler-npm) [](https://badge.fury.io/js/google-closure-compiler)
|
|
3
|
+
|
|
4
|
+
Check, compile, optimize and compress Javascript with Closure-Compiler
|
|
5
|
+
|
|
6
|
+
This repository tracks issues related to the publication to npmjs.org and associated plugins.
|
|
7
|
+
Any bugs not related to the plugins themselves should be reported to the
|
|
8
|
+
[main repository](https://github.com/google/closure-compiler/).
|
|
9
|
+
|
|
10
|
+
## Getting Started
|
|
11
|
+
*This package requires java to be installed and in the path.* Looking for a version that
|
|
12
|
+
does not require java? See [google-closure-compiler-js](https://github.com/google/closure-compiler-js).
|
|
13
|
+
|
|
14
|
+
If you are new to [Closure-Compiler](https://developers.google.com/closure/compiler/), make
|
|
15
|
+
sure to read and understand the
|
|
16
|
+
[compilation levels](https://developers.google.com/closure/compiler/docs/compilation_levels) as
|
|
17
|
+
the compiler works very differently depending on the compilation level selected.
|
|
18
|
+
|
|
19
|
+
For help or questions with the compiler, the best resource is
|
|
20
|
+
[Stack Overflow](http://stackoverflow.com/questions/tagged/google-closure-compiler). Posts there
|
|
21
|
+
are monitored by multiple Closure Compiler team members.
|
|
22
|
+
|
|
23
|
+
You may also post in the
|
|
24
|
+
[Closure Compiler Discuss Google Group](https://groups.google.com/forum/#!forum/closure-compiler-discuss).
|
|
25
|
+
|
|
26
|
+
*Please don't cross post to both Stackoverflow and Closure Compiler Discuss.*
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
The compiler package now includes build tool plugins for [Grunt](http://gruntjs.com/) and
|
|
30
|
+
[Gulp](http://gulpjs.com/).
|
|
31
|
+
|
|
32
|
+
### Installation
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
npm install --save google-closure-compiler
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Configuration
|
|
39
|
+
|
|
40
|
+
The compiler has a large number of flags. The best documentation for the flags can be found by
|
|
41
|
+
running the `--help` command of the compiler.jar found inside the
|
|
42
|
+
`node_modules/google-closure-compiler` folder:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
java -jar compiler.jar --help
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Specifying Options
|
|
49
|
+
|
|
50
|
+
Both the grunt and gulp tasks take options objects. The option parameters map directly to the
|
|
51
|
+
compiler flags without the leading '--' characters.
|
|
52
|
+
|
|
53
|
+
Values are either strings or booleans. Options which have multiple values can be arrays.
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
{
|
|
57
|
+
js: ['/file-one.js', '/file-two.js'],
|
|
58
|
+
compilation_level: 'ADVANCED',
|
|
59
|
+
js_output_file: 'out.js',
|
|
60
|
+
debug: true
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For advanced usages, the options may be specified as an array of strings. These values _include_
|
|
65
|
+
the "--" characters and are directly passed to the compiler in the order specified:
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
[
|
|
69
|
+
'--js', '/file-one.js',
|
|
70
|
+
'--js', '/file-two.js',
|
|
71
|
+
'--compilation_level', 'ADVANCED',
|
|
72
|
+
'--js_output_file', 'out.js',
|
|
73
|
+
'--debug'
|
|
74
|
+
]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
When an array of flags is passed, the input files should not be specified via the build tools, but
|
|
78
|
+
rather as compilation flags directly.
|
|
79
|
+
|
|
80
|
+
Some shells (particularly windows) try to do expansion on globs rather than passing the string on
|
|
81
|
+
to the compiler. To prevent this it is necessary to quote certain arguments:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
{
|
|
85
|
+
js: '"my/quoted/glob/**.js"',
|
|
86
|
+
compilation_level: 'ADVANCED',
|
|
87
|
+
js_output_file: 'out.js',
|
|
88
|
+
debug: true
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Using the Grunt Task
|
|
93
|
+
|
|
94
|
+
Include the plugin in your Gruntfile.js:
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
require('google-closure-compiler').grunt(grunt);
|
|
98
|
+
// The load-grunt-tasks plugin won't automatically load closure-compiler
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Task targets, files and options may be specified according to the grunt
|
|
102
|
+
[Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
|
|
103
|
+
|
|
104
|
+
### Basic Configuration Example:
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
require('google-closure-compiler').grunt(grunt);
|
|
108
|
+
|
|
109
|
+
// Project configuration.
|
|
110
|
+
grunt.initConfig({
|
|
111
|
+
'closure-compiler': {
|
|
112
|
+
my_target: {
|
|
113
|
+
files: {
|
|
114
|
+
'dest/output.min.js': ['src/js/**/*.js']
|
|
115
|
+
},
|
|
116
|
+
options: {
|
|
117
|
+
compilation_level: 'SIMPLE',
|
|
118
|
+
language_in: 'ECMASCRIPT5_STRICT',
|
|
119
|
+
create_source_map: 'dest/output.min.js.map',
|
|
120
|
+
output_wrapper: '(function(){\n%output%\n}).call(this)\n//# sourceMappingURL=output.min.js.map'
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Closure Library Example:
|
|
128
|
+
|
|
129
|
+
```js
|
|
130
|
+
|
|
131
|
+
var compilerPackage = require('google-closure-compiler');
|
|
132
|
+
compilerPackage.grunt(grunt);
|
|
133
|
+
|
|
134
|
+
// Project configuration.
|
|
135
|
+
grunt.initConfig({
|
|
136
|
+
'closure-compiler': {
|
|
137
|
+
my_target: {
|
|
138
|
+
files: {
|
|
139
|
+
'dest/output.min.js': ['src/js/**/*.js']
|
|
140
|
+
},
|
|
141
|
+
options: {
|
|
142
|
+
js: '/node_modules/google-closure-library/**.js'
|
|
143
|
+
externs: compilerPackage.compiler.CONTRIB_PATH + '/externs/jquery-1.9.js',
|
|
144
|
+
compilation_level: 'SIMPLE',
|
|
145
|
+
manage_closure_dependencies: true,
|
|
146
|
+
language_in: 'ECMASCRIPT5_STRICT',
|
|
147
|
+
create_source_map: 'dest/output.min.js.map',
|
|
148
|
+
output_wrapper: '(function(){\n%output%\n}).call(this)\n//# sourceMappingURL=output.min.js.map'
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Advanced Usage with Arguments Array:
|
|
156
|
+
|
|
157
|
+
```js
|
|
158
|
+
// Project configuration.
|
|
159
|
+
grunt.initConfig({
|
|
160
|
+
'closure-compiler': {
|
|
161
|
+
my_target: {
|
|
162
|
+
options: {
|
|
163
|
+
// When args is present, all other options are ignored
|
|
164
|
+
args: [
|
|
165
|
+
'--js', '/file-one.js',
|
|
166
|
+
'--js', '/file-two.js',
|
|
167
|
+
'--compilation_level', 'ADVANCED',
|
|
168
|
+
'--js_output_file', 'out.js',
|
|
169
|
+
'--debug'
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Using the Gulp Plugin
|
|
178
|
+
|
|
179
|
+
The gulp plugin supports piping multiple files through the compiler.
|
|
180
|
+
|
|
181
|
+
Options are a direct match to the compiler flags without the leading "--".
|
|
182
|
+
|
|
183
|
+
### Basic Configuration Example:
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
var closureCompiler = require('google-closure-compiler').gulp();
|
|
187
|
+
|
|
188
|
+
gulp.task('js-compile', function () {
|
|
189
|
+
return gulp.src('./src/js/**/*.js', {base: './'})
|
|
190
|
+
.pipe(closureCompiler({
|
|
191
|
+
compilation_level: 'SIMPLE',
|
|
192
|
+
warning_level: 'VERBOSE',
|
|
193
|
+
language_in: 'ECMASCRIPT6_STRICT',
|
|
194
|
+
language_out: 'ECMASCRIPT5_STRICT',
|
|
195
|
+
output_wrapper: '(function(){\n%output%\n}).call(this)',
|
|
196
|
+
js_output_file: 'output.min.js'
|
|
197
|
+
}))
|
|
198
|
+
.pipe(gulp.dest('./dist/js'));
|
|
199
|
+
});
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Use without gulp.src
|
|
203
|
+
Gulp files are all read into memory, transformed into a JSON stream, and piped through the
|
|
204
|
+
compiler. With large source sets this may require a large amount of memory.
|
|
205
|
+
|
|
206
|
+
Closure-compiler can natively expand file globs which will greatly alleviate this issue.
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
var compilerPackage = require('google-closure-compiler');
|
|
210
|
+
var closureCompiler = compilerPackage.gulp();
|
|
211
|
+
|
|
212
|
+
gulp.task('js-compile', function () {
|
|
213
|
+
return closureCompiler({
|
|
214
|
+
js: './src/js/**.js',
|
|
215
|
+
externs: compilerPackage.compiler.CONTRIB_PATH + '/externs/jquery-1.9.js',
|
|
216
|
+
compilation_level: 'SIMPLE',
|
|
217
|
+
warning_level: 'VERBOSE',
|
|
218
|
+
language_in: 'ECMASCRIPT6_STRICT',
|
|
219
|
+
language_out: 'ECMASCRIPT5_STRICT',
|
|
220
|
+
output_wrapper: '(function(){\n%output%\n}).call(this)',
|
|
221
|
+
js_output_file: 'output.min.js'
|
|
222
|
+
})
|
|
223
|
+
.src() // needed to force the plugin to run without gulp.src
|
|
224
|
+
.pipe(gulp.dest('./dist/js'));
|
|
225
|
+
});
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### gulp.src base option
|
|
229
|
+
Gulp attempts to set the base of a glob from the point of the first wildcard. This isn't always
|
|
230
|
+
what is desired. Users can specify the { base: 'path' } option to `gulp.src` calls to override
|
|
231
|
+
this behavior.
|
|
232
|
+
|
|
233
|
+
### Advanced Usage with Arguments Array:
|
|
234
|
+
|
|
235
|
+
```js
|
|
236
|
+
var closureCompiler = require('google-closure-compiler').gulp();
|
|
237
|
+
|
|
238
|
+
gulp.task('js-compile', function () {
|
|
239
|
+
return closureCompiler([
|
|
240
|
+
'--js', '/file-one.js',
|
|
241
|
+
'--js', '/file-two.js',
|
|
242
|
+
'--compilation_level', 'ADVANCED',
|
|
243
|
+
'--js_output_file', 'out.js',
|
|
244
|
+
'--debug'
|
|
245
|
+
])
|
|
246
|
+
.src() // needed to force the plugin to run without gulp.src
|
|
247
|
+
.pipe(gulp.dest('./dist/js'));
|
|
248
|
+
});
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Gulp Sourcemaps
|
|
252
|
+
The gulp plugin supports gulp sourcemaps.
|
|
253
|
+
|
|
254
|
+
```js
|
|
255
|
+
var closureCompiler = require('google-closure-compiler').gulp();
|
|
256
|
+
var sourcemaps = require('gulp-sourcemaps');
|
|
257
|
+
|
|
258
|
+
gulp.task('js-compile', function () {
|
|
259
|
+
return gulp.src('./src/js/**/*.js', {base: './'})
|
|
260
|
+
.pipe(sourcemaps.init())
|
|
261
|
+
.pipe(closureCompiler({
|
|
262
|
+
compilation_level: 'SIMPLE',
|
|
263
|
+
warning_level: 'VERBOSE',
|
|
264
|
+
language_in: 'ECMASCRIPT6_STRICT',
|
|
265
|
+
language_out: 'ECMASCRIPT5_STRICT',
|
|
266
|
+
output_wrapper: '(function(){\n%output%\n}).call(this)',
|
|
267
|
+
js_output_file: 'output.min.js'
|
|
268
|
+
}))
|
|
269
|
+
.pipe(sourcemaps.write('/')) // gulp-sourcemaps automatically adds the sourcemap url comment
|
|
270
|
+
.pipe(gulp.dest('./dist/js'));
|
|
271
|
+
});
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Specifying Extra Java Arguments
|
|
275
|
+
Some users may wish to pass the java vm extra arguments - such as to specify the amount of memory the compiler should
|
|
276
|
+
be allocated. Both the grunt and gulp plugins support this.
|
|
277
|
+
|
|
278
|
+
### Grunt
|
|
279
|
+
```js
|
|
280
|
+
require('google-closure-compiler').grunt(grunt, ['-Xms2048m']);
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Gulp
|
|
284
|
+
```js
|
|
285
|
+
var closureCompiler = require('google-closure-compiler').gulp({
|
|
286
|
+
extraArguments: ['-Xms2048m']
|
|
287
|
+
});
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Plugin Authors and Native Node Usage
|
|
291
|
+
A low-level node class is included to facilitate spawning the compiler jar as a process from Node.
|
|
292
|
+
In addition, it exposes a static property with the path to the compiler jar file.
|
|
293
|
+
|
|
294
|
+
```js
|
|
295
|
+
var ClosureCompiler = require('google-closure-compiler').compiler;
|
|
296
|
+
|
|
297
|
+
console.log(ClosureCompiler.COMPILER_PATH); // absolute path the compiler jar
|
|
298
|
+
console.log(ClosureCompiler.CONTRIB_PATH); // absolute path the contrib folder which contains
|
|
299
|
+
|
|
300
|
+
var closureCompiler = new ClosureCompiler({
|
|
301
|
+
js: 'file-one.js',
|
|
302
|
+
compilation_level: 'ADVANCED'
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
var compilerProcess = closureCompiler.run(function(exitCode, stdOut, stdErr) {
|
|
306
|
+
//compilation complete
|
|
307
|
+
});
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## License
|
|
311
|
+
Copyright 2015 The Closure Compiler Authors
|
|
312
|
+
|
|
313
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
314
|
+
you may not use this file except in compliance with the License.
|
|
315
|
+
You may obtain a copy of the License at
|
|
316
|
+
|
|
317
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
318
|
+
|
|
319
|
+
Unless required by applicable law or agreed to in writing, software
|
|
320
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
321
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
322
|
+
See the License for the specific language governing permissions and
|
|
323
|
+
limitations under the License.
|
|
324
|
+
|
|
325
|
+
## Version History
|
|
326
|
+
Closure Compiler release notes can be found on the
|
|
327
|
+
[main repository wiki](https://github.com/google/closure-compiler/wiki/Binary-Downloads).
|
package/compiler.jar
CHANGED
|
Binary file
|
|
@@ -285,6 +285,12 @@ angular.ResourceInstance = function() {};
|
|
|
285
285
|
angular.ResourceInstance.prototype.$promise;
|
|
286
286
|
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* @type {boolean}
|
|
290
|
+
*/
|
|
291
|
+
angular.ResourceInstance.prototype.$resolved;
|
|
292
|
+
|
|
293
|
+
|
|
288
294
|
/**
|
|
289
295
|
* Usage: resource.$get([parameters], [success], [error])
|
|
290
296
|
*
|
|
@@ -448,7 +448,7 @@ angular.LinkingFunctions.post = function(scope, iElement, iAttrs, controller) {
|
|
|
448
448
|
* function(!angular.JQLite=,!angular.Attributes=): string|
|
|
449
449
|
* undefined),
|
|
450
450
|
* templateNamespace: (string|undefined),
|
|
451
|
-
* templateUrl: (string|
|
|
451
|
+
* templateUrl: (string|!Object|
|
|
452
452
|
* function(!angular.JQLite=,!angular.Attributes=)|
|
|
453
453
|
* undefined),
|
|
454
454
|
* terminal: (boolean|undefined),
|
|
@@ -522,7 +522,8 @@ angular.Directive.scope;
|
|
|
522
522
|
angular.Directive.template;
|
|
523
523
|
|
|
524
524
|
/**
|
|
525
|
-
* @type {(string|function(!angular.JQLite=,
|
|
525
|
+
* @type {(string|!Object|function(!angular.JQLite=,
|
|
526
|
+
* !angular.Attributes=)|undefined)}
|
|
526
527
|
*/
|
|
527
528
|
angular.Directive.templateUrl;
|
|
528
529
|
|
|
@@ -2266,7 +2267,7 @@ angular.$routeProvider.when = function(path, route) {};
|
|
|
2266
2267
|
* controller: (angular.Injectable|string|undefined),
|
|
2267
2268
|
* controllerAs: (string|undefined),
|
|
2268
2269
|
* template: (string|undefined),
|
|
2269
|
-
* templateUrl: (string|function(!Object.<string,string>=)|undefined),
|
|
2270
|
+
* templateUrl: (string|!Object|function(!Object.<string,string>=)|undefined),
|
|
2270
2271
|
* resolve: (Object.<string, (
|
|
2271
2272
|
* string|angular.Injectable|!angular.$q.Promise
|
|
2272
2273
|
* )>|undefined),
|
|
@@ -285,6 +285,12 @@ angular.ResourceInstance = function() {};
|
|
|
285
285
|
angular.ResourceInstance.prototype.$promise;
|
|
286
286
|
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* @type {boolean}
|
|
290
|
+
*/
|
|
291
|
+
angular.ResourceInstance.prototype.$resolved;
|
|
292
|
+
|
|
293
|
+
|
|
288
294
|
/**
|
|
289
295
|
* Usage: resource.$get([parameters], [success], [error])
|
|
290
296
|
*
|
|
@@ -413,7 +413,7 @@ angular.LinkingFunctions.post = function(scope, iElement, iAttrs, controller) {
|
|
|
413
413
|
* function(!angular.JQLite=,!angular.Attributes=): string|
|
|
414
414
|
* undefined),
|
|
415
415
|
* templateNamespace: (string|undefined),
|
|
416
|
-
* templateUrl: (string|
|
|
416
|
+
* templateUrl: (string|!Object|
|
|
417
417
|
* function(!angular.JQLite=,!angular.Attributes=)|
|
|
418
418
|
* undefined),
|
|
419
419
|
* terminal: (boolean|undefined),
|
|
@@ -2140,7 +2140,7 @@ angular.$routeProvider.Params.controllerAs;
|
|
|
2140
2140
|
/** @type {string} */
|
|
2141
2141
|
angular.$routeProvider.Params.template;
|
|
2142
2142
|
|
|
2143
|
-
/** @type {string|function(!Object.<string,string>=)} */
|
|
2143
|
+
/** @type {string|!Object|function(!Object.<string,string>=)} */
|
|
2144
2144
|
angular.$routeProvider.Params.templateUrl;
|
|
2145
2145
|
|
|
2146
2146
|
/** @type {Object.<string, (string|angular.Injectable|!angular.$q.Promise)>} */
|
|
@@ -71,9 +71,11 @@ angular.$q.Promise.prototype.catch = function(callback) {};
|
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @param {?function(?)} callback
|
|
74
|
+
* @param {?(function(?): ?)=} opt_notifyCallback
|
|
74
75
|
* @return {!angular.$q.Promise.<T>}
|
|
75
76
|
*/
|
|
76
|
-
angular.$q.Promise.prototype.finally =
|
|
77
|
+
angular.$q.Promise.prototype.finally =
|
|
78
|
+
function(callback, opt_notifyCallback) {};
|
|
77
79
|
|
|
78
80
|
/**
|
|
79
81
|
* @constructor
|
|
@@ -129,6 +131,13 @@ angular.$q.Deferred.prototype.promise;
|
|
|
129
131
|
*/
|
|
130
132
|
angular.$q.prototype.all = function(promises) {};
|
|
131
133
|
|
|
134
|
+
/**
|
|
135
|
+
* @param {!Array<!angular.$q.Promise>|!Object<string,!angular.$q.Promise>}
|
|
136
|
+
* promises
|
|
137
|
+
* @return {!angular.$q.Promise}
|
|
138
|
+
*/
|
|
139
|
+
angular.$q.prototype.race = function(promises) {};
|
|
140
|
+
|
|
132
141
|
/**
|
|
133
142
|
* @return {!angular.$q.Deferred}
|
|
134
143
|
*/
|
|
@@ -140,6 +149,15 @@ angular.$q.prototype.defer = function() {};
|
|
|
140
149
|
*/
|
|
141
150
|
angular.$q.prototype.reject = function(opt_reason) {};
|
|
142
151
|
|
|
152
|
+
/**
|
|
153
|
+
* This definition was added to fix "non-existent property" warnings in
|
|
154
|
+
* Closure Compiler. By defining as unknown, we declare that the property
|
|
155
|
+
* exists, but do not require correct usage from existing code.
|
|
156
|
+
*
|
|
157
|
+
* @type {?}
|
|
158
|
+
*/
|
|
159
|
+
angular.$q.prototype.resolve;
|
|
160
|
+
|
|
143
161
|
/**
|
|
144
162
|
* @param {RESULT} value
|
|
145
163
|
* @return {!angular.$q.Promise.<RESULT>}
|
|
@@ -285,6 +285,12 @@ angular.ResourceInstance = function() {};
|
|
|
285
285
|
angular.ResourceInstance.prototype.$promise;
|
|
286
286
|
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* @type {boolean}
|
|
290
|
+
*/
|
|
291
|
+
angular.ResourceInstance.prototype.$resolved;
|
|
292
|
+
|
|
293
|
+
|
|
288
294
|
/**
|
|
289
295
|
* Usage: resource.$get([parameters], [success], [error])
|
|
290
296
|
*
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
* $cookieStore
|
|
22
22
|
* $httpBackend
|
|
23
23
|
* $rootElement
|
|
24
|
-
* $rootScope
|
|
25
24
|
*
|
|
26
25
|
* @see http://angularjs.org/
|
|
27
26
|
* @externs
|
|
@@ -193,6 +192,8 @@ angular.module = function(name, opt_requires, opt_configFn) {};
|
|
|
193
192
|
|
|
194
193
|
angular.noop = function() {};
|
|
195
194
|
|
|
195
|
+
angular.reloadWithDebugInfo = function() {};
|
|
196
|
+
|
|
196
197
|
/**
|
|
197
198
|
* @param {Object|Array|Date|string|number|boolean} obj
|
|
198
199
|
* @param {boolean=} opt_pretty
|
|
@@ -432,7 +433,7 @@ angular.LinkingFunctions.post = function(scope, iElement, iAttrs, controller) {
|
|
|
432
433
|
* scope: (boolean|Object.<string, string>|undefined),
|
|
433
434
|
* template: (string|!angular.Injectable|undefined),
|
|
434
435
|
* templateNamespace: (string|undefined),
|
|
435
|
-
* templateUrl: (string|!angular.Injectable|undefined),
|
|
436
|
+
* templateUrl: (string|!angular.Injectable|!Object|undefined),
|
|
436
437
|
* terminal: (boolean|undefined),
|
|
437
438
|
* transclude: (boolean|string|!Object.<string, string>|undefined)
|
|
438
439
|
* }}
|
|
@@ -441,13 +442,16 @@ angular.Directive;
|
|
|
441
442
|
|
|
442
443
|
|
|
443
444
|
|
|
444
|
-
/**
|
|
445
|
+
/**
|
|
446
|
+
* @interface
|
|
447
|
+
* @template T
|
|
448
|
+
*/
|
|
445
449
|
angular.Change;
|
|
446
450
|
|
|
447
|
-
/** @type {
|
|
451
|
+
/** @type {T} */
|
|
448
452
|
angular.Change.prototype.currentValue;
|
|
449
453
|
|
|
450
|
-
/** @type {
|
|
454
|
+
/** @type {T} */
|
|
451
455
|
angular.Change.prototype.previousValue;
|
|
452
456
|
|
|
453
457
|
/** @return {boolean} */
|
|
@@ -490,7 +494,7 @@ angular.Component.prototype.controllerAs;
|
|
|
490
494
|
angular.Component.prototype.template;
|
|
491
495
|
|
|
492
496
|
/**
|
|
493
|
-
* @type {string|!angular.Injectable|undefined}
|
|
497
|
+
* @type {string|!angular.Injectable|!Object|undefined}
|
|
494
498
|
*/
|
|
495
499
|
angular.Component.prototype.templateUrl;
|
|
496
500
|
|
|
@@ -925,7 +929,10 @@ angular.Module.prototype.name;
|
|
|
925
929
|
*/
|
|
926
930
|
angular.Module.prototype.requires;
|
|
927
931
|
|
|
928
|
-
/**
|
|
932
|
+
/**
|
|
933
|
+
* NOTE: $rootScope is the same as angular.Scope.
|
|
934
|
+
* @constructor
|
|
935
|
+
*/
|
|
929
936
|
angular.Scope = function() {};
|
|
930
937
|
|
|
931
938
|
/** @type {?string} */
|
|
@@ -966,9 +973,10 @@ angular.Scope.prototype.$emit = function(name, args) {};
|
|
|
966
973
|
angular.Scope.prototype.$eval = function(opt_exp, opt_locals) {};
|
|
967
974
|
|
|
968
975
|
/**
|
|
969
|
-
* @param {(string|function())=} opt_exp
|
|
976
|
+
* @param {(string|function(angular.Scope, ?))=} opt_exp
|
|
977
|
+
* @param {!Object=} opt_locals
|
|
970
978
|
*/
|
|
971
|
-
angular.Scope.prototype.$evalAsync = function(opt_exp) {};
|
|
979
|
+
angular.Scope.prototype.$evalAsync = function(opt_exp, opt_locals) {};
|
|
972
980
|
|
|
973
981
|
/** @type {string} */
|
|
974
982
|
angular.Scope.prototype.$id;
|
|
@@ -1283,6 +1291,12 @@ angular.$compileProvider = function() {};
|
|
|
1283
1291
|
*/
|
|
1284
1292
|
angular.$compileProvider.prototype.debugInfoEnabled = function(opt_enabled) {};
|
|
1285
1293
|
|
|
1294
|
+
/**
|
|
1295
|
+
* @param {number} iterations
|
|
1296
|
+
* @return {boolean|!angular.$compileProvider}
|
|
1297
|
+
*/
|
|
1298
|
+
angular.$compileProvider.prototype.onChangesTtl = function(iterations) {};
|
|
1299
|
+
|
|
1286
1300
|
/**
|
|
1287
1301
|
* @param {!RegExp=} opt_expression
|
|
1288
1302
|
* @return {!RegExp|!angular.$compileProvider}
|
|
@@ -1297,6 +1311,27 @@ angular.$compileProvider.prototype.aHrefSanitizationWhitelist = function(
|
|
|
1297
1311
|
angular.$compileProvider.prototype.imgSrcSanitizationWhitelist = function(
|
|
1298
1312
|
opt_expression) {};
|
|
1299
1313
|
|
|
1314
|
+
/**
|
|
1315
|
+
* @param {boolean=} opt_enabled
|
|
1316
|
+
* @return {boolean|!angular.$compileProvider}
|
|
1317
|
+
*/
|
|
1318
|
+
angular.$compileProvider.prototype.commentDirectivesEnabled = function(
|
|
1319
|
+
opt_enabled) {};
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* @param {boolean=} opt_enabled
|
|
1323
|
+
* @return {boolean|!angular.$compileProvider}
|
|
1324
|
+
*/
|
|
1325
|
+
angular.$compileProvider.prototype.cssClassDirectivesEnabled = function(
|
|
1326
|
+
opt_enabled) {};
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* @param {boolean=} opt_enabled
|
|
1330
|
+
* @return {boolean|!angular.$compileProvider}
|
|
1331
|
+
*/
|
|
1332
|
+
angular.$compileProvider.prototype.preAssignBindingsEnabled = function(
|
|
1333
|
+
opt_enabled) {};
|
|
1334
|
+
|
|
1300
1335
|
/**
|
|
1301
1336
|
* @param {string} name
|
|
1302
1337
|
* @param {!angular.Component} options
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2014 The Closure Compiler Authors.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @fileoverview AngularJS' HTTP promises. This version of the externs file
|
|
19
|
+
* provides templated promises.
|
|
20
|
+
* @see https://docs.angularjs.org/api/ng/service/$http
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Left here for backwards compatibility, but no longer used.
|
|
26
|
+
*
|
|
27
|
+
* @typedef {function((string|Object), number,
|
|
28
|
+
* function(string=): (string|Object|null), angular.$http.Config)}
|
|
29
|
+
*/
|
|
30
|
+
angular.HttpCallback;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @interface
|
|
34
|
+
* @template T
|
|
35
|
+
*/
|
|
36
|
+
angular.$http.Response = function() {};
|
|
37
|
+
|
|
38
|
+
/** @type {T} */
|
|
39
|
+
angular.$http.Response.prototype.data;
|
|
40
|
+
|
|
41
|
+
/** @type {number} */
|
|
42
|
+
angular.$http.Response.prototype.status;
|
|
43
|
+
|
|
44
|
+
/** @type {string} */
|
|
45
|
+
angular.$http.Response.prototype.statusText;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @param {string=} name
|
|
49
|
+
* @return {string|Object}
|
|
50
|
+
*/
|
|
51
|
+
angular.$http.Response.prototype.headers = function(name) {};
|
|
52
|
+
|
|
53
|
+
/** @type {!angular.$http.Config} */
|
|
54
|
+
angular.$http.Response.prototype.config;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @interface
|
|
58
|
+
* @extends {angular.$q.Promise.<!angular.$http.Response.<T>>}
|
|
59
|
+
* @template T
|
|
60
|
+
*/
|
|
61
|
+
angular.$http.HttpPromise = function() {};
|