google-closure-compiler 20250412.0.0-nightly → 20250413.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 +5 -30
- package/cli.js +3 -4
- package/externs/browser/decorators.js +276 -0
- package/externs/browser/deprecated.js +58 -0
- package/externs/browser/es6_proxy.js +143 -0
- package/externs/browser/fetchapi.js +449 -0
- package/externs/browser/fido.js +94 -0
- package/externs/browser/flash.js +226 -0
- package/externs/browser/gecko_css.js +126 -0
- package/externs/browser/gecko_dom.js +479 -0
- package/externs/browser/gecko_event.js +86 -0
- package/externs/browser/gecko_xml.js +73 -0
- package/externs/browser/google_legacy.js +31 -0
- package/externs/browser/html5.js +6647 -0
- package/externs/browser/ie_css.js +270 -0
- package/externs/browser/ie_dom.js +1232 -0
- package/externs/browser/ie_event.js +310 -0
- package/externs/browser/ie_vml.js +77 -0
- package/externs/browser/intersection_observer.js +178 -0
- package/externs/browser/intl.js +602 -0
- package/externs/browser/iphone.js +204 -0
- package/externs/browser/mediakeys.js +305 -0
- package/externs/browser/mediasource.js +155 -0
- package/externs/browser/nonstandard_anim_timing.js +97 -0
- package/externs/browser/nonstandard_audio.js +82 -0
- package/externs/browser/nonstandard_console.js +75 -0
- package/externs/browser/nonstandard_fileapi.js +1066 -0
- package/externs/browser/nonstandard_indexeddb.js +78 -0
- package/externs/browser/nonstandard_navigation_timing.js +38 -0
- package/externs/browser/nonstandard_selection.js +80 -0
- package/externs/browser/page_visibility.js +28 -0
- package/externs/browser/streamsapi.js +593 -0
- package/externs/browser/svg.js +10016 -0
- package/externs/browser/url.js +202 -0
- package/externs/browser/v8.js +134 -0
- package/externs/browser/w3c_abort.js +89 -0
- package/externs/browser/w3c_anim_timing.js +49 -0
- package/externs/browser/w3c_aria_mixin.js +286 -0
- package/externs/browser/w3c_audio.js +1660 -0
- package/externs/browser/w3c_batterystatus.js +85 -0
- package/externs/browser/w3c_clipboard.js +74 -0
- package/externs/browser/w3c_clipboardevent.js +47 -0
- package/externs/browser/w3c_composition_event.js +93 -0
- package/externs/browser/w3c_css.js +3790 -0
- package/externs/browser/w3c_css3d.js +199 -0
- package/externs/browser/w3c_device_sensor_event.js +122 -0
- package/externs/browser/w3c_dom1.js +1160 -0
- package/externs/browser/w3c_dom2.js +3151 -0
- package/externs/browser/w3c_dom3.js +555 -0
- package/externs/browser/w3c_dom4.js +289 -0
- package/externs/browser/w3c_elementtraversal.js +116 -0
- package/externs/browser/w3c_event.js +607 -0
- package/externs/browser/w3c_event3.js +77 -0
- package/externs/browser/w3c_eventsource.js +110 -0
- package/externs/browser/w3c_fileapi.js +302 -0
- package/externs/browser/w3c_gamepad.js +113 -0
- package/externs/browser/w3c_geolocation.js +130 -0
- package/externs/browser/w3c_geometry1.js +899 -0
- package/externs/browser/w3c_indexeddb.js +771 -0
- package/externs/browser/w3c_keyboardlock.js +47 -0
- package/externs/browser/w3c_mediacapabilities.js +206 -0
- package/externs/browser/w3c_midi.js +301 -0
- package/externs/browser/w3c_navigation.js +72 -0
- package/externs/browser/w3c_navigation_timing.js +437 -0
- package/externs/browser/w3c_netinfo.js +85 -0
- package/externs/browser/w3c_payment_request.js +401 -0
- package/externs/browser/w3c_permissions.js +112 -0
- package/externs/browser/w3c_permissions_policy.js +78 -0
- package/externs/browser/w3c_pointer_events.js +163 -0
- package/externs/browser/w3c_pointerlock.js +63 -0
- package/externs/browser/w3c_range.js +284 -0
- package/externs/browser/w3c_referrer_policy.js +36 -0
- package/externs/browser/w3c_requestidlecallback.js +76 -0
- package/externs/browser/w3c_rtc.js +3882 -0
- package/externs/browser/w3c_screen_orientation.js +53 -0
- package/externs/browser/w3c_screen_wake_lock.js +58 -0
- package/externs/browser/w3c_selection.js +209 -0
- package/externs/browser/w3c_selectors.js +113 -0
- package/externs/browser/w3c_serviceworker.js +739 -0
- package/externs/browser/w3c_speech.js +426 -0
- package/externs/browser/w3c_touch_event.js +296 -0
- package/externs/browser/w3c_trusted_types.js +142 -0
- package/externs/browser/w3c_vibration.js +38 -0
- package/externs/browser/w3c_webcodecs.js +1473 -0
- package/externs/browser/w3c_webcrypto.js +839 -0
- package/externs/browser/w3c_worklets.js +54 -0
- package/externs/browser/w3c_xml.js +533 -0
- package/externs/browser/web_animations.js +452 -0
- package/externs/browser/web_app_manifest.js +50 -0
- package/externs/browser/webassembly.js +223 -0
- package/externs/browser/webgl.js +3409 -0
- package/externs/browser/webgl2.js +2727 -0
- package/externs/browser/webgl2_compute.js +1609 -0
- package/externs/browser/webkit_css.js +456 -0
- package/externs/browser/webkit_dom.js +118 -0
- package/externs/browser/webkit_event.js +46 -0
- package/externs/browser/webkit_notifications.js +258 -0
- package/externs/browser/webkit_usercontent.js +55 -0
- package/externs/browser/weblocksapi.js +125 -0
- package/externs/browser/webstorage.js +171 -0
- package/externs/browser/whatwg_bitmap_context.js +37 -0
- package/externs/browser/whatwg_console.js +152 -0
- package/externs/browser/whatwg_encoding.js +99 -0
- package/externs/browser/whatwg_file_system.js +296 -0
- package/externs/browser/wicg_attribution_reporting.js +42 -0
- package/externs/browser/wicg_compression_stream.js +60 -0
- package/externs/browser/wicg_constructable_stylesheets.js +60 -0
- package/externs/browser/wicg_entries.js +169 -0
- package/externs/browser/wicg_file_handling.js +41 -0
- package/externs/browser/wicg_file_system_access.js +191 -0
- package/externs/browser/wicg_floc.js +41 -0
- package/externs/browser/wicg_ink.js +89 -0
- package/externs/browser/wicg_resizeobserver.js +100 -0
- package/externs/browser/wicg_scheduler.js +62 -0
- package/externs/browser/wicg_trust_token.js +89 -0
- package/externs/browser/wicg_uach.js +100 -0
- package/externs/browser/window.js +190 -0
- package/externs/es3.js +2716 -0
- package/externs/es5.js +284 -0
- package/externs/es6.js +2554 -0
- package/externs/es6_collections.js +323 -0
- package/index.js +13 -16
- package/lib/grunt/index.js +71 -92
- package/lib/grunt/vinyl-stream.js +12 -18
- package/lib/gulp/concat-to-json.js +30 -18
- package/lib/gulp/index.js +174 -181
- package/lib/gulp/json-to-vinyl.js +8 -8
- package/lib/node/{closure-compiler.js → index.js} +27 -51
- package/lib/utils.js +16 -14
- package/package.json +19 -16
- package/lib/logger.js +0 -89
package/README.md
CHANGED
|
@@ -84,7 +84,6 @@ The compiler package also includes build tool plugins for [Grunt](http://gruntjs
|
|
|
84
84
|
|
|
85
85
|
* [Grunt Plugin](https://github.com/google/closure-compiler-npm/blob/master/packages/google-closure-compiler/docs/grunt.md)
|
|
86
86
|
* [Gulp Plugin](https://github.com/google/closure-compiler-npm/blob/master/packages/google-closure-compiler/docs/gulp.md)
|
|
87
|
-
* [Webpack Plugin](https://github.com/webpack-contrib/closure-webpack-plugin)
|
|
88
87
|
|
|
89
88
|
### Community Maintained Plugins
|
|
90
89
|
Additionally, community members have created plugins leveraging this library.
|
|
@@ -97,36 +96,12 @@ Additionally, community members have created plugins leveraging this library.
|
|
|
97
96
|
Override the path before first use.
|
|
98
97
|
|
|
99
98
|
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Compiler.prototype.javaPath = '/node_modules/MODULE_NAME/jre/jre1.8.0_131.jre/Contents/Home/bin/java';
|
|
99
|
+
import Compiler from 'google-closure-compiler';
|
|
103
100
|
|
|
104
101
|
const compiler = new Compiler({args});
|
|
102
|
+
compiler.javaPath = '/node_modules/MODULE_NAME/jre/jre1.8.0_131.jre/Contents/Home/bin/java';
|
|
105
103
|
```
|
|
106
104
|
|
|
107
|
-
### Running the compiler using nailgun
|
|
108
|
-
*Note: nailgun users are encouraged to try the native binary versions where available.*
|
|
109
|
-
|
|
110
|
-
This gets around the long startup time of Google Closure Compiler using
|
|
111
|
-
[Nailgun](https://github.com/facebook/nailgun), which runs a single java process in the background
|
|
112
|
-
and keeps all of the classes loaded.
|
|
113
|
-
|
|
114
|
-
First you need to install closure-gun by running the following command.
|
|
115
|
-
```bash
|
|
116
|
-
npm install closure-gun
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Then point the package to use closure-gun rather than the JDK.
|
|
120
|
-
|
|
121
|
-
```js
|
|
122
|
-
const compilerPackage = require('google-closure-compiler');
|
|
123
|
-
|
|
124
|
-
compilerPackage.compiler.JAR_PATH = undefined;
|
|
125
|
-
compilerPackage.compiler.prototype.javaPath = './node_modules/.bin/closure-gun'
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Note that when using gulp, Only invocations without gulp.src work with nailgun.
|
|
129
|
-
|
|
130
105
|
## Native Node Usage (for Plugin Authors)
|
|
131
106
|
A low-level node class is included to facilitate spawning the compiler jar as a process from Node.
|
|
132
107
|
In addition, it exposes a static property with the path to the compiler jar file.
|
|
@@ -134,10 +109,10 @@ In addition, it exposes a static property with the path to the compiler jar file
|
|
|
134
109
|
### Java Version
|
|
135
110
|
|
|
136
111
|
```js
|
|
137
|
-
|
|
112
|
+
import ClosureCompiler, {COMPILER_PATH, CONTRIB_PATH} from 'google-closure-compiler';
|
|
138
113
|
|
|
139
|
-
console.log(
|
|
140
|
-
console.log(
|
|
114
|
+
console.log(COMPILER_PATH); // absolute path to the compiler jar
|
|
115
|
+
console.log(CONTRIB_PATH); // absolute path to the contrib folder which contain externs
|
|
141
116
|
|
|
142
117
|
const closureCompiler = new ClosureCompiler({
|
|
143
118
|
js: 'file-one.js',
|
package/cli.js
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import Compiler from './lib/node/index.js';
|
|
18
|
+
import {getNativeImagePath, getFirstSupportedPlatform} from './lib/utils.js';
|
|
19
|
+
import parseArgs from 'minimist';
|
|
20
20
|
|
|
21
21
|
const compilerFlags = parseArgs(process.argv.slice(2));
|
|
22
22
|
|
|
@@ -59,7 +59,6 @@ Object.keys(compilerFlags).forEach((flag) => {
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
const Compiler = require('./lib/node/closure-compiler');
|
|
63
62
|
let args = process.argv.slice(2);
|
|
64
63
|
for (let i = 0; i < args.length; i++) {
|
|
65
64
|
if (/^--platform/.test(args[i])) {
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 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 Decorators for TypeScript classes.
|
|
19
|
+
* NOTE: generated by tsickle, then manually edited to fix type errors.
|
|
20
|
+
* Generated from: third_party/javascript/node_modules/typescript/stable/lib/lib.decorators.d.ts
|
|
21
|
+
*
|
|
22
|
+
* @externs
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @template Class
|
|
27
|
+
* @record
|
|
28
|
+
* @struct
|
|
29
|
+
*/
|
|
30
|
+
function ClassDecoratorContext() {}
|
|
31
|
+
/** @const {string} */
|
|
32
|
+
ClassDecoratorContext.prototype.kind;
|
|
33
|
+
/** @const {(undefined|string)} */
|
|
34
|
+
ClassDecoratorContext.prototype.name;
|
|
35
|
+
/** @const {(undefined|?)} */
|
|
36
|
+
ClassDecoratorContext.prototype.metadata;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Adds a callback to be invoked after the class definition has been finalized.
|
|
40
|
+
*
|
|
41
|
+
* \@example
|
|
42
|
+
* ```ts
|
|
43
|
+
* function customElement(name: string): ClassDecoratorFunction {
|
|
44
|
+
* return (target, context) => {
|
|
45
|
+
* context.addInitializer(function () {
|
|
46
|
+
* customElements.define(name, this);
|
|
47
|
+
* });
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
*
|
|
51
|
+
* \@customElement("my-element")
|
|
52
|
+
* class MyElement {}
|
|
53
|
+
* ```
|
|
54
|
+
* @public
|
|
55
|
+
* @param {function(this: (Class)): void} initializer
|
|
56
|
+
* @return {void}
|
|
57
|
+
*/
|
|
58
|
+
ClassDecoratorContext.prototype.addInitializer = function(initializer) {};
|
|
59
|
+
/**
|
|
60
|
+
* @template This, Value
|
|
61
|
+
* @record
|
|
62
|
+
* @struct
|
|
63
|
+
*/
|
|
64
|
+
function ClassMethodDecoratorContext() {}
|
|
65
|
+
/** @const {string} */
|
|
66
|
+
ClassMethodDecoratorContext.prototype.kind;
|
|
67
|
+
/** @const {(string|symbol)} */
|
|
68
|
+
ClassMethodDecoratorContext.prototype.name;
|
|
69
|
+
/** @const {boolean} */
|
|
70
|
+
ClassMethodDecoratorContext.prototype.static;
|
|
71
|
+
/** @const {boolean} */
|
|
72
|
+
ClassMethodDecoratorContext.prototype.private;
|
|
73
|
+
/** @const {{has: function(This): boolean, get: function(This): Value}} */
|
|
74
|
+
ClassMethodDecoratorContext.prototype.access;
|
|
75
|
+
/** @const {(undefined|?)} */
|
|
76
|
+
ClassMethodDecoratorContext.prototype.metadata;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Adds a callback to be invoked either after static methods are defined but before
|
|
80
|
+
* static initializers are run (when decorating a `static` element), or before instance
|
|
81
|
+
* initializers are run (when decorating a non-`static` element).
|
|
82
|
+
*
|
|
83
|
+
* \@example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const bound: ClassMethodDecoratorFunction = (value, context) {
|
|
86
|
+
* if (context.private) throw new TypeError("Not supported on private methods.");
|
|
87
|
+
* context.addInitializer(function () {
|
|
88
|
+
* this[context.name] = this[context.name].bind(this);
|
|
89
|
+
* });
|
|
90
|
+
* }
|
|
91
|
+
*
|
|
92
|
+
* class C {
|
|
93
|
+
* message = "Hello";
|
|
94
|
+
*
|
|
95
|
+
* \@bound
|
|
96
|
+
* m() {
|
|
97
|
+
* console.log(this.message);
|
|
98
|
+
* }
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
101
|
+
* @public
|
|
102
|
+
* @param {function(this: (This)): void} initializer
|
|
103
|
+
* @return {void}
|
|
104
|
+
*/
|
|
105
|
+
ClassMethodDecoratorContext.prototype.addInitializer = function(initializer) {};
|
|
106
|
+
/**
|
|
107
|
+
* @template This, Value
|
|
108
|
+
* @record
|
|
109
|
+
* @struct
|
|
110
|
+
*/
|
|
111
|
+
function ClassGetterDecoratorContext() {}
|
|
112
|
+
/** @const {string} */
|
|
113
|
+
ClassGetterDecoratorContext.prototype.kind;
|
|
114
|
+
/** @const {(string|symbol)} */
|
|
115
|
+
ClassGetterDecoratorContext.prototype.name;
|
|
116
|
+
/** @const {boolean} */
|
|
117
|
+
ClassGetterDecoratorContext.prototype.static;
|
|
118
|
+
/** @const {boolean} */
|
|
119
|
+
ClassGetterDecoratorContext.prototype.private;
|
|
120
|
+
/** @const {{has: function(This): boolean, get: function(This): Value}} */
|
|
121
|
+
ClassGetterDecoratorContext.prototype.access;
|
|
122
|
+
/** @const {(undefined|?)} */
|
|
123
|
+
ClassGetterDecoratorContext.prototype.metadata;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Adds a callback to be invoked either after static methods are defined but before
|
|
127
|
+
* static initializers are run (when decorating a `static` element), or before instance
|
|
128
|
+
* initializers are run (when decorating a non-`static` element).
|
|
129
|
+
* @public
|
|
130
|
+
* @param {function(this: (This)): void} initializer
|
|
131
|
+
* @return {void}
|
|
132
|
+
*/
|
|
133
|
+
ClassGetterDecoratorContext.prototype.addInitializer = function(initializer) {};
|
|
134
|
+
/**
|
|
135
|
+
* @template This, Value
|
|
136
|
+
* @record
|
|
137
|
+
* @struct
|
|
138
|
+
*/
|
|
139
|
+
function ClassSetterDecoratorContext() {}
|
|
140
|
+
/** @const {string} */
|
|
141
|
+
ClassSetterDecoratorContext.prototype.kind;
|
|
142
|
+
/** @const {(string|symbol)} */
|
|
143
|
+
ClassSetterDecoratorContext.prototype.name;
|
|
144
|
+
/** @const {boolean} */
|
|
145
|
+
ClassSetterDecoratorContext.prototype.static;
|
|
146
|
+
/** @const {boolean} */
|
|
147
|
+
ClassSetterDecoratorContext.prototype.private;
|
|
148
|
+
/** @const {{has: function(This): boolean, set: function(This, Value): void}} */
|
|
149
|
+
ClassSetterDecoratorContext.prototype.access;
|
|
150
|
+
/** @const {(undefined|?)} */
|
|
151
|
+
ClassSetterDecoratorContext.prototype.metadata;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Adds a callback to be invoked either after static methods are defined but before
|
|
155
|
+
* static initializers are run (when decorating a `static` element), or before instance
|
|
156
|
+
* initializers are run (when decorating a non-`static` element).
|
|
157
|
+
* @public
|
|
158
|
+
* @param {function(this: (This)): void} initializer
|
|
159
|
+
* @return {void}
|
|
160
|
+
*/
|
|
161
|
+
ClassSetterDecoratorContext.prototype.addInitializer = function(initializer) {};
|
|
162
|
+
/**
|
|
163
|
+
* @template This, Value
|
|
164
|
+
* @record
|
|
165
|
+
* @struct
|
|
166
|
+
*/
|
|
167
|
+
function ClassAccessorDecoratorContext() {}
|
|
168
|
+
/** @const {string} */
|
|
169
|
+
ClassAccessorDecoratorContext.prototype.kind;
|
|
170
|
+
/** @const {(string|symbol)} */
|
|
171
|
+
ClassAccessorDecoratorContext.prototype.name;
|
|
172
|
+
/** @const {boolean} */
|
|
173
|
+
ClassAccessorDecoratorContext.prototype.static;
|
|
174
|
+
/** @const {boolean} */
|
|
175
|
+
ClassAccessorDecoratorContext.prototype.private;
|
|
176
|
+
/** @const {{has: function(This): boolean, get: function(This): Value, set: function(This, Value): void}} */
|
|
177
|
+
ClassAccessorDecoratorContext.prototype.access;
|
|
178
|
+
/** @const {(undefined|?)} */
|
|
179
|
+
ClassAccessorDecoratorContext.prototype.metadata;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Adds a callback to be invoked immediately after the auto `accessor` being
|
|
183
|
+
* decorated is initialized (regardless if the `accessor` is `static` or not).
|
|
184
|
+
* @public
|
|
185
|
+
* @param {function(this: (This)): void} initializer
|
|
186
|
+
* @return {void}
|
|
187
|
+
*/
|
|
188
|
+
ClassAccessorDecoratorContext.prototype.addInitializer = function(initializer) {};
|
|
189
|
+
/**
|
|
190
|
+
* @template This, Value
|
|
191
|
+
* @record
|
|
192
|
+
* @struct
|
|
193
|
+
*/
|
|
194
|
+
function ClassAccessorDecoratorTarget() {}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Invokes the getter that was defined prior to decorator application.
|
|
198
|
+
*
|
|
199
|
+
* \@example
|
|
200
|
+
* let value = target.get.call(instance);
|
|
201
|
+
* @public
|
|
202
|
+
* @this {This}
|
|
203
|
+
* @return {Value}
|
|
204
|
+
*/
|
|
205
|
+
ClassAccessorDecoratorTarget.prototype.get = function() {};
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Invokes the setter that was defined prior to decorator application.
|
|
209
|
+
*
|
|
210
|
+
* \@example
|
|
211
|
+
* target.set.call(instance, value);
|
|
212
|
+
* @public
|
|
213
|
+
* @this {This}
|
|
214
|
+
* @param {Value} value
|
|
215
|
+
* @return {void}
|
|
216
|
+
*/
|
|
217
|
+
ClassAccessorDecoratorTarget.prototype.set = function(value) {};
|
|
218
|
+
/**
|
|
219
|
+
* @template This, Value
|
|
220
|
+
* @record
|
|
221
|
+
* @struct
|
|
222
|
+
*/
|
|
223
|
+
function ClassAccessorDecoratorResult() {}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* An optional replacement getter function. If not provided, the existing getter function is used instead.
|
|
227
|
+
* @public
|
|
228
|
+
* @this {This}
|
|
229
|
+
* @return {Value}
|
|
230
|
+
*/
|
|
231
|
+
ClassAccessorDecoratorResult.prototype.get = function() {};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* An optional replacement setter function. If not provided, the existing setter function is used instead.
|
|
235
|
+
* @public
|
|
236
|
+
* @this {This}
|
|
237
|
+
* @param {Value} value
|
|
238
|
+
* @return {void}
|
|
239
|
+
*/
|
|
240
|
+
ClassAccessorDecoratorResult.prototype.set = function(value) {};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* An optional initializer mutator that is invoked when the underlying field initializer is evaluated.
|
|
244
|
+
* @public
|
|
245
|
+
* @this {This}
|
|
246
|
+
* @param {Value} value The incoming initializer value.
|
|
247
|
+
* @return {Value} The replacement initializer value.
|
|
248
|
+
*/
|
|
249
|
+
ClassAccessorDecoratorResult.prototype.init = function(value) {};
|
|
250
|
+
/**
|
|
251
|
+
* @template This, Value
|
|
252
|
+
* @record
|
|
253
|
+
* @struct
|
|
254
|
+
*/
|
|
255
|
+
function ClassFieldDecoratorContext() {}
|
|
256
|
+
/** @const {string} */
|
|
257
|
+
ClassFieldDecoratorContext.prototype.kind;
|
|
258
|
+
/** @const {(string|symbol)} */
|
|
259
|
+
ClassFieldDecoratorContext.prototype.name;
|
|
260
|
+
/** @const {boolean} */
|
|
261
|
+
ClassFieldDecoratorContext.prototype.static;
|
|
262
|
+
/** @const {boolean} */
|
|
263
|
+
ClassFieldDecoratorContext.prototype.private;
|
|
264
|
+
/** @const {{has: function(This): boolean, get: function(This): Value, set: function(This, Value): void}} */
|
|
265
|
+
ClassFieldDecoratorContext.prototype.access;
|
|
266
|
+
/** @const {(undefined|?)} */
|
|
267
|
+
ClassFieldDecoratorContext.prototype.metadata;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Adds a callback to be invoked immediately after the field being decorated
|
|
271
|
+
* is initialized (regardless if the field is `static` or not).
|
|
272
|
+
* @public
|
|
273
|
+
* @param {function(this: (This)): void} initializer
|
|
274
|
+
* @return {void}
|
|
275
|
+
*/
|
|
276
|
+
ClassFieldDecoratorContext.prototype.addInitializer = function(initializer) {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2008 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 JavaScript Built-Ins that are not part of any specifications
|
|
19
|
+
* but are still needed in some project's build.
|
|
20
|
+
* @externs
|
|
21
|
+
*/
|
|
22
|
+
var opera = {};
|
|
23
|
+
|
|
24
|
+
opera.postError;
|
|
25
|
+
|
|
26
|
+
/** @nosideeffects */
|
|
27
|
+
opera.version = function() {};
|
|
28
|
+
|
|
29
|
+
/** @constructor */
|
|
30
|
+
function XSLTProcessor() {}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param {Node} styleSheet
|
|
34
|
+
* @return {undefined}
|
|
35
|
+
* @deprecated
|
|
36
|
+
*/
|
|
37
|
+
XSLTProcessor.prototype.importStylesheet = function(styleSheet) {};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {Node} source
|
|
41
|
+
* @return {Document}
|
|
42
|
+
* @deprecated
|
|
43
|
+
*/
|
|
44
|
+
XSLTProcessor.prototype.transformToDocument = function(source) {};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param {Node} source
|
|
48
|
+
* @param {Document} document
|
|
49
|
+
* @return {DocumentFragment}
|
|
50
|
+
* @deprecated
|
|
51
|
+
*/
|
|
52
|
+
XSLTProcessor.prototype.transformToFragment = function(source, document) {};
|
|
53
|
+
|
|
54
|
+
// The "methods" object is a place to hang arbitrary external
|
|
55
|
+
// properties. It is a throwback to pre-typed days, and should
|
|
56
|
+
// not be used for any new definitions; it exists only to bridge
|
|
57
|
+
// the gap between the old way and the new way.
|
|
58
|
+
var methods = {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2018 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 Definitions for ECMAScript 6 Proxy objects.
|
|
19
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-objects
|
|
20
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @record
|
|
27
|
+
* @template TARGET
|
|
28
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots
|
|
29
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler
|
|
30
|
+
*/
|
|
31
|
+
function ProxyHandler() {}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @type {(function(TARGET):?Object)|undefined}
|
|
35
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof
|
|
36
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getPrototypeOf
|
|
37
|
+
*/
|
|
38
|
+
ProxyHandler.prototype.getPrototypeOf /* = function(target) {} */;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @type {(function(TARGET, ?Object):boolean)|undefined}
|
|
42
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v
|
|
43
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/setPrototypeOf
|
|
44
|
+
*/
|
|
45
|
+
ProxyHandler.prototype.setPrototypeOf /* = function(target, proto) {} */;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @type {(function(TARGET):boolean)|undefined}
|
|
49
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-isextensible
|
|
50
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/isExtensible
|
|
51
|
+
*/
|
|
52
|
+
ProxyHandler.prototype.isExtensible /* = function(target) {} */;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @type {(function(TARGET):boolean)|undefined}
|
|
56
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-preventextensions
|
|
57
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/preventExtensions
|
|
58
|
+
*/
|
|
59
|
+
ProxyHandler.prototype.preventExtensions /* = function(target) {} */;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @type {(function(TARGET, (string|symbol)):(!ObjectPropertyDescriptor|undefined))|undefined}
|
|
63
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p
|
|
64
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor
|
|
65
|
+
*/
|
|
66
|
+
ProxyHandler.prototype.getOwnPropertyDescriptor /* = function(target, prop) {} */;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @type {(function(TARGET, (string|symbol), !ObjectPropertyDescriptor):boolean)|undefined}
|
|
70
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc
|
|
71
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/defineProperty
|
|
72
|
+
*/
|
|
73
|
+
ProxyHandler.prototype.defineProperty /* = function(target, prop, desc) {} */;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @type {(function(TARGET, (string|symbol)):boolean)|undefined}
|
|
77
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-hasproperty-p
|
|
78
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/has
|
|
79
|
+
*/
|
|
80
|
+
ProxyHandler.prototype.has /* = function(target, prop) {} */;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @type {(function(TARGET, (string|symbol), !Object):*)|undefined}
|
|
84
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver
|
|
85
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/get
|
|
86
|
+
*/
|
|
87
|
+
ProxyHandler.prototype.get /* = function(target, prop, receiver) {} */;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @type {(function(TARGET, (string|symbol), *, !Object):boolean)|undefined}
|
|
91
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver
|
|
92
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/set
|
|
93
|
+
*/
|
|
94
|
+
ProxyHandler.prototype.set /* = function(target, prop, value, receiver) {} */;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @type {(function(TARGET, (string|symbol)):boolean)|undefined}
|
|
98
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-delete-p
|
|
99
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/deleteProperty
|
|
100
|
+
*/
|
|
101
|
+
ProxyHandler.prototype.deleteProperty /* = function (target, prop) {} */;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @type {(function(TARGET):!Array<(string|symbol)>)|undefined}
|
|
105
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
|
|
106
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/ownKeys
|
|
107
|
+
*/
|
|
108
|
+
ProxyHandler.prototype.ownKeys /* = function(target) {} */;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @type {(function(TARGET, *, !Array):*)|undefined}
|
|
112
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist
|
|
113
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/apply
|
|
114
|
+
*/
|
|
115
|
+
ProxyHandler.prototype.apply /* = function(target, thisArg, argList) {} */;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @type {(function(TARGET, !Array, function(new: ?, ...?)):!Object)|undefined}
|
|
119
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget
|
|
120
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/construct
|
|
121
|
+
*/
|
|
122
|
+
ProxyHandler.prototype.construct /* = function(target, argList, newTarget) {} */;
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @constructor
|
|
127
|
+
* @param {TARGET} target
|
|
128
|
+
* @param {!ProxyHandler<TARGET>} handler
|
|
129
|
+
* @template TARGET
|
|
130
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy-constructor
|
|
131
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#Syntax
|
|
132
|
+
*/
|
|
133
|
+
function Proxy(target, handler) {}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @param {TARGET} target
|
|
137
|
+
* @param {!ProxyHandler<TARGET>} handler
|
|
138
|
+
* @return {{proxy: !Proxy<TARGET>, revoke: function():void}}
|
|
139
|
+
* @template TARGET
|
|
140
|
+
* @see https://tc39.github.io/ecma262/#sec-proxy.revocable
|
|
141
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable
|
|
142
|
+
*/
|
|
143
|
+
Proxy.revocable = function(target, handler) {};
|