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.
Files changed (131) hide show
  1. package/README.md +5 -30
  2. package/cli.js +3 -4
  3. package/externs/browser/decorators.js +276 -0
  4. package/externs/browser/deprecated.js +58 -0
  5. package/externs/browser/es6_proxy.js +143 -0
  6. package/externs/browser/fetchapi.js +449 -0
  7. package/externs/browser/fido.js +94 -0
  8. package/externs/browser/flash.js +226 -0
  9. package/externs/browser/gecko_css.js +126 -0
  10. package/externs/browser/gecko_dom.js +479 -0
  11. package/externs/browser/gecko_event.js +86 -0
  12. package/externs/browser/gecko_xml.js +73 -0
  13. package/externs/browser/google_legacy.js +31 -0
  14. package/externs/browser/html5.js +6647 -0
  15. package/externs/browser/ie_css.js +270 -0
  16. package/externs/browser/ie_dom.js +1232 -0
  17. package/externs/browser/ie_event.js +310 -0
  18. package/externs/browser/ie_vml.js +77 -0
  19. package/externs/browser/intersection_observer.js +178 -0
  20. package/externs/browser/intl.js +602 -0
  21. package/externs/browser/iphone.js +204 -0
  22. package/externs/browser/mediakeys.js +305 -0
  23. package/externs/browser/mediasource.js +155 -0
  24. package/externs/browser/nonstandard_anim_timing.js +97 -0
  25. package/externs/browser/nonstandard_audio.js +82 -0
  26. package/externs/browser/nonstandard_console.js +75 -0
  27. package/externs/browser/nonstandard_fileapi.js +1066 -0
  28. package/externs/browser/nonstandard_indexeddb.js +78 -0
  29. package/externs/browser/nonstandard_navigation_timing.js +38 -0
  30. package/externs/browser/nonstandard_selection.js +80 -0
  31. package/externs/browser/page_visibility.js +28 -0
  32. package/externs/browser/streamsapi.js +593 -0
  33. package/externs/browser/svg.js +10016 -0
  34. package/externs/browser/url.js +202 -0
  35. package/externs/browser/v8.js +134 -0
  36. package/externs/browser/w3c_abort.js +89 -0
  37. package/externs/browser/w3c_anim_timing.js +49 -0
  38. package/externs/browser/w3c_aria_mixin.js +286 -0
  39. package/externs/browser/w3c_audio.js +1660 -0
  40. package/externs/browser/w3c_batterystatus.js +85 -0
  41. package/externs/browser/w3c_clipboard.js +74 -0
  42. package/externs/browser/w3c_clipboardevent.js +47 -0
  43. package/externs/browser/w3c_composition_event.js +93 -0
  44. package/externs/browser/w3c_css.js +3790 -0
  45. package/externs/browser/w3c_css3d.js +199 -0
  46. package/externs/browser/w3c_device_sensor_event.js +122 -0
  47. package/externs/browser/w3c_dom1.js +1160 -0
  48. package/externs/browser/w3c_dom2.js +3151 -0
  49. package/externs/browser/w3c_dom3.js +555 -0
  50. package/externs/browser/w3c_dom4.js +289 -0
  51. package/externs/browser/w3c_elementtraversal.js +116 -0
  52. package/externs/browser/w3c_event.js +607 -0
  53. package/externs/browser/w3c_event3.js +77 -0
  54. package/externs/browser/w3c_eventsource.js +110 -0
  55. package/externs/browser/w3c_fileapi.js +302 -0
  56. package/externs/browser/w3c_gamepad.js +113 -0
  57. package/externs/browser/w3c_geolocation.js +130 -0
  58. package/externs/browser/w3c_geometry1.js +899 -0
  59. package/externs/browser/w3c_indexeddb.js +771 -0
  60. package/externs/browser/w3c_keyboardlock.js +47 -0
  61. package/externs/browser/w3c_mediacapabilities.js +206 -0
  62. package/externs/browser/w3c_midi.js +301 -0
  63. package/externs/browser/w3c_navigation.js +72 -0
  64. package/externs/browser/w3c_navigation_timing.js +437 -0
  65. package/externs/browser/w3c_netinfo.js +85 -0
  66. package/externs/browser/w3c_payment_request.js +401 -0
  67. package/externs/browser/w3c_permissions.js +112 -0
  68. package/externs/browser/w3c_permissions_policy.js +78 -0
  69. package/externs/browser/w3c_pointer_events.js +163 -0
  70. package/externs/browser/w3c_pointerlock.js +63 -0
  71. package/externs/browser/w3c_range.js +284 -0
  72. package/externs/browser/w3c_referrer_policy.js +36 -0
  73. package/externs/browser/w3c_requestidlecallback.js +76 -0
  74. package/externs/browser/w3c_rtc.js +3882 -0
  75. package/externs/browser/w3c_screen_orientation.js +53 -0
  76. package/externs/browser/w3c_screen_wake_lock.js +58 -0
  77. package/externs/browser/w3c_selection.js +209 -0
  78. package/externs/browser/w3c_selectors.js +113 -0
  79. package/externs/browser/w3c_serviceworker.js +739 -0
  80. package/externs/browser/w3c_speech.js +426 -0
  81. package/externs/browser/w3c_touch_event.js +296 -0
  82. package/externs/browser/w3c_trusted_types.js +142 -0
  83. package/externs/browser/w3c_vibration.js +38 -0
  84. package/externs/browser/w3c_webcodecs.js +1473 -0
  85. package/externs/browser/w3c_webcrypto.js +839 -0
  86. package/externs/browser/w3c_worklets.js +54 -0
  87. package/externs/browser/w3c_xml.js +533 -0
  88. package/externs/browser/web_animations.js +452 -0
  89. package/externs/browser/web_app_manifest.js +50 -0
  90. package/externs/browser/webassembly.js +223 -0
  91. package/externs/browser/webgl.js +3409 -0
  92. package/externs/browser/webgl2.js +2727 -0
  93. package/externs/browser/webgl2_compute.js +1609 -0
  94. package/externs/browser/webkit_css.js +456 -0
  95. package/externs/browser/webkit_dom.js +118 -0
  96. package/externs/browser/webkit_event.js +46 -0
  97. package/externs/browser/webkit_notifications.js +258 -0
  98. package/externs/browser/webkit_usercontent.js +55 -0
  99. package/externs/browser/weblocksapi.js +125 -0
  100. package/externs/browser/webstorage.js +171 -0
  101. package/externs/browser/whatwg_bitmap_context.js +37 -0
  102. package/externs/browser/whatwg_console.js +152 -0
  103. package/externs/browser/whatwg_encoding.js +99 -0
  104. package/externs/browser/whatwg_file_system.js +296 -0
  105. package/externs/browser/wicg_attribution_reporting.js +42 -0
  106. package/externs/browser/wicg_compression_stream.js +60 -0
  107. package/externs/browser/wicg_constructable_stylesheets.js +60 -0
  108. package/externs/browser/wicg_entries.js +169 -0
  109. package/externs/browser/wicg_file_handling.js +41 -0
  110. package/externs/browser/wicg_file_system_access.js +191 -0
  111. package/externs/browser/wicg_floc.js +41 -0
  112. package/externs/browser/wicg_ink.js +89 -0
  113. package/externs/browser/wicg_resizeobserver.js +100 -0
  114. package/externs/browser/wicg_scheduler.js +62 -0
  115. package/externs/browser/wicg_trust_token.js +89 -0
  116. package/externs/browser/wicg_uach.js +100 -0
  117. package/externs/browser/window.js +190 -0
  118. package/externs/es3.js +2716 -0
  119. package/externs/es5.js +284 -0
  120. package/externs/es6.js +2554 -0
  121. package/externs/es6_collections.js +323 -0
  122. package/index.js +13 -16
  123. package/lib/grunt/index.js +71 -92
  124. package/lib/grunt/vinyl-stream.js +12 -18
  125. package/lib/gulp/concat-to-json.js +30 -18
  126. package/lib/gulp/index.js +174 -181
  127. package/lib/gulp/json-to-vinyl.js +8 -8
  128. package/lib/node/{closure-compiler.js → index.js} +27 -51
  129. package/lib/utils.js +16 -14
  130. package/package.json +19 -16
  131. package/lib/logger.js +0 -89
package/externs/es6.js ADDED
@@ -0,0 +1,2554 @@
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 Definitions for ECMAScript 6 and later.
19
+ * @see https://tc39.github.io/ecma262/
20
+ * @see https://www.khronos.org/registry/typedarray/specs/latest/
21
+ * @externs
22
+ */
23
+
24
+ /**
25
+ * Some es6 definitions:
26
+ * Symbol, IIterableResult, Iterable, IteratorIterable, Iterator,
27
+ * IteratorIterable moved to es3 file, because some base type requires them, and
28
+ * we want to keep them together. If you add new externs related to those types
29
+ * define them together in the es3 file.
30
+ */
31
+
32
+ /**
33
+ * TODO(b/142881197): TReturn and TNext are not yet used for anything.
34
+ * https://github.com/google/closure-compiler/issues/3489
35
+ * @interface
36
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator
37
+ * @extends {IteratorIterable<T, ?, *>}
38
+ * @template T, TReturn, TNext
39
+ */
40
+ function Generator() {}
41
+
42
+ /**
43
+ * @param {?=} opt_value
44
+ * @return {!IIterableResult<T>}
45
+ * @override
46
+ */
47
+ Generator.prototype.next = function(opt_value) {};
48
+
49
+ /**
50
+ * @param {T} value
51
+ * @return {!IIterableResult<T>}
52
+ */
53
+ Generator.prototype.return = function(value) {};
54
+
55
+ /**
56
+ * @param {?} exception
57
+ * @return {!IIterableResult<T>}
58
+ */
59
+ Generator.prototype.throw = function(exception) {};
60
+
61
+
62
+
63
+ /**
64
+ * @param {number} value
65
+ * @return {number}
66
+ * @nosideeffects
67
+ */
68
+ Math.log10 = function(value) {};
69
+
70
+ /**
71
+ * @param {number} value
72
+ * @return {number}
73
+ * @nosideeffects
74
+ */
75
+ Math.log2 = function(value) {};
76
+
77
+ /**
78
+ * @param {number} value
79
+ * @return {number}
80
+ * @nosideeffects
81
+ */
82
+ Math.log1p = function(value) {};
83
+
84
+ /**
85
+ * @param {number} value
86
+ * @return {number}
87
+ * @nosideeffects
88
+ */
89
+ Math.expm1 = function(value) {};
90
+
91
+ /**
92
+ * @param {number} value
93
+ * @return {number}
94
+ * @nosideeffects
95
+ */
96
+ Math.cosh = function(value) {};
97
+
98
+ /**
99
+ * @param {number} value
100
+ * @return {number}
101
+ * @nosideeffects
102
+ */
103
+ Math.sinh = function(value) {};
104
+
105
+ /**
106
+ * @param {number} value
107
+ * @return {number}
108
+ * @nosideeffects
109
+ */
110
+ Math.tanh = function(value) {};
111
+
112
+ /**
113
+ * @param {number} value
114
+ * @return {number}
115
+ * @nosideeffects
116
+ */
117
+ Math.acosh = function(value) {};
118
+
119
+ /**
120
+ * @param {number} value
121
+ * @return {number}
122
+ * @nosideeffects
123
+ */
124
+ Math.asinh = function(value) {};
125
+
126
+ /**
127
+ * @param {number} value
128
+ * @return {number}
129
+ * @nosideeffects
130
+ */
131
+ Math.atanh = function(value) {};
132
+
133
+ /**
134
+ * @param {number} value
135
+ * @return {number}
136
+ * @nosideeffects
137
+ */
138
+ Math.trunc = function(value) {};
139
+
140
+ /**
141
+ * @param {number} value
142
+ * @return {number}
143
+ * @nosideeffects
144
+ */
145
+ Math.sign = function(value) {};
146
+
147
+ /**
148
+ * @param {number} value
149
+ * @return {number}
150
+ * @nosideeffects
151
+ */
152
+ Math.cbrt = function(value) {};
153
+
154
+ /**
155
+ * @param {...number} var_args
156
+ * @return {number}
157
+ * @nosideeffects
158
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot
159
+ */
160
+ Math.hypot = function(var_args) {};
161
+
162
+ /**
163
+ * @param {number} value1
164
+ * @param {number} value2
165
+ * @return {number}
166
+ * @nosideeffects
167
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
168
+ */
169
+ Math.imul = function(value1, value2) {};
170
+
171
+ /**
172
+ * @param {number} value
173
+ * @return {number}
174
+ * @nosideeffects
175
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
176
+ */
177
+ Math.clz32 = function(value) {};
178
+
179
+ /**
180
+ * @param {number} value
181
+ * @return {number}
182
+ * @nosideeffects
183
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround
184
+ */
185
+ Math.fround = function(value) {};
186
+
187
+
188
+ /**
189
+ * @param {*} a
190
+ * @param {*} b
191
+ * @return {boolean}
192
+ * @nosideeffects
193
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
194
+ */
195
+ Object.is = function(a, b) {};
196
+
197
+
198
+ /**
199
+ * Returns a language-sensitive string representation of this number.
200
+ * @param {(string|!Array<string>)=} opt_locales
201
+ * @param {Object=} opt_options
202
+ * @return {string}
203
+ * @nosideeffects
204
+ * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString
205
+ * @see http://www.ecma-international.org/ecma-402/1.0/#sec-13.2.1
206
+ * @override
207
+ */
208
+ Number.prototype.toLocaleString = function(opt_locales, opt_options) {};
209
+
210
+ /**
211
+ * Returns the wrapped primitive value of this Number object.
212
+ * @return {number}
213
+ * @nosideeffects
214
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/valueOf
215
+ * @override
216
+ */
217
+ Number.prototype.valueOf = function() {};
218
+
219
+ /**
220
+ * NOTE: this is an ES2022 extern.
221
+ * @param {number} index
222
+ * @return {string}
223
+ * @this {String|string}
224
+ * @nosideeffects
225
+ * @see https://tc39.github.io/ecma262/#sec-string.prototype.at
226
+ */
227
+ String.prototype.at = function(index) {};
228
+
229
+ /**
230
+ * Pads the end of the string so that it reaches the given length.
231
+ * NOTE: this is an ES2017 (ES8) extern.
232
+ *
233
+ * @param {number} targetLength The target length.
234
+ * @param {string=} opt_padString The string to pad with.
235
+ * @this {String|string}
236
+ * @return {string}
237
+ * @nosideeffects
238
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd
239
+ */
240
+ String.prototype.padEnd = function(targetLength, opt_padString) {};
241
+
242
+ /**
243
+ * Pads the start of the string so that it reaches the given length.
244
+ * NOTE: this is an ES2017 (ES8) extern.
245
+ *
246
+ * @param {number} targetLength The target length.
247
+ * @param {string=} opt_padString The string to pad with.
248
+ * @this {String|string}
249
+ * @return {string}
250
+ * @nosideeffects
251
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart
252
+ */
253
+ String.prototype.padStart = function(targetLength, opt_padString) {};
254
+
255
+ /**
256
+ * Repeats the string the given number of times.
257
+ *
258
+ * @param {number} count The number of times the string is repeated.
259
+ * @this {String|string}
260
+ * @return {string}
261
+ * @nosideeffects
262
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
263
+ */
264
+ String.prototype.repeat = function(count) {};
265
+
266
+ /**
267
+ * @constructor
268
+ * @extends {Array<string>}
269
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-gettemplateobject
270
+ */
271
+ var ITemplateArray = function() {};
272
+
273
+ /**
274
+ * @type {!Array<string>}
275
+ */
276
+ ITemplateArray.prototype.raw;
277
+
278
+ /**
279
+ * @param {!ITemplateArray} template
280
+ * @param {...*} var_args Substitution values.
281
+ * @return {string}
282
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw
283
+ */
284
+ String.raw = function(template, var_args) {};
285
+
286
+
287
+ /**
288
+ * @param {number} codePoint
289
+ * @param {...number} var_args Additional codepoints
290
+ * @return {string}
291
+ */
292
+ String.fromCodePoint = function(codePoint, var_args) {};
293
+
294
+
295
+ /**
296
+ * @param {number} index
297
+ * @return {number}
298
+ * @nosideeffects
299
+ */
300
+ String.prototype.codePointAt = function(index) {};
301
+
302
+
303
+ /**
304
+ * @param {string=} opt_form
305
+ * @return {string}
306
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize
307
+ */
308
+ String.prototype.normalize = function(opt_form) {};
309
+
310
+
311
+ /**
312
+ * @param {string} searchString
313
+ * @param {number=} opt_position
314
+ * @return {boolean}
315
+ * @nosideeffects
316
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
317
+ */
318
+ String.prototype.startsWith = function(searchString, opt_position) {};
319
+
320
+ /**
321
+ * @param {!RegExp|string} searchValue
322
+ * @param {?string|function(string, ...?):*} replacement
323
+ * @return {string}
324
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll
325
+ */
326
+ String.prototype.replaceAll = function(searchValue, replacement) {};
327
+
328
+ /**
329
+ * @param {string} searchString
330
+ * @param {number=} opt_position
331
+ * @return {boolean}
332
+ * @nosideeffects
333
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
334
+ */
335
+ String.prototype.endsWith = function(searchString, opt_position) {};
336
+
337
+ /**
338
+ * @param {string} searchString
339
+ * @param {number=} opt_position
340
+ * @return {boolean}
341
+ * @nosideeffects
342
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
343
+ */
344
+ String.prototype.includes = function(searchString, opt_position) {};
345
+
346
+ /**
347
+ * @this {String|string}
348
+ * @return {string}
349
+ * @nosideeffects
350
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart
351
+ */
352
+ String.prototype.trimStart = function() {};
353
+
354
+
355
+ /**
356
+ * @this {String|string}
357
+ * @return {string}
358
+ * @nosideeffects
359
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd
360
+ */
361
+ String.prototype.trimEnd = function() {};
362
+
363
+
364
+ /**
365
+ * @this {String|string}
366
+ * @param {!RegExp|string} regexp
367
+ * @return {!IteratorIterable<!RegExpResult>}
368
+ * @nosideeffects
369
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/matchAll
370
+ */
371
+ String.prototype.matchAll = function(regexp) {};
372
+
373
+
374
+ /**
375
+ * @see http://dev.w3.org/html5/postmsg/
376
+ * @interface
377
+ */
378
+ function Transferable() {}
379
+
380
+ /**
381
+ * @param {number} length The length in bytes
382
+ * @constructor
383
+ * @throws {Error}
384
+ * @implements {Transferable}
385
+ */
386
+ function ArrayBuffer(length) {}
387
+
388
+ /** @type {number} */
389
+ ArrayBuffer.prototype.byteLength;
390
+
391
+ /**
392
+ * @param {number} begin
393
+ * @param {number=} opt_end
394
+ * @return {!ArrayBuffer}
395
+ * @nosideeffects
396
+ */
397
+ ArrayBuffer.prototype.slice = function(begin, opt_end) {};
398
+
399
+ /**
400
+ * @param {*} arg
401
+ * @return {boolean}
402
+ * @nosideeffects
403
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView
404
+ */
405
+ ArrayBuffer.isView = function(arg) {};
406
+
407
+
408
+ /**
409
+ * @constructor
410
+ * @template TArrayBuffer (unused)
411
+ */
412
+ function ArrayBufferView() {}
413
+
414
+ /** @type {!ArrayBuffer} */
415
+ ArrayBufferView.prototype.buffer;
416
+
417
+ /** @type {number} */
418
+ ArrayBufferView.prototype.byteOffset;
419
+
420
+ /** @type {number} */
421
+ ArrayBufferView.prototype.byteLength;
422
+
423
+
424
+ /**
425
+ * @param {number} length The length in bytes
426
+ * @constructor
427
+ * @throws {Error}
428
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
429
+ */
430
+ function SharedArrayBuffer(length) {}
431
+
432
+ /** @type {number} */
433
+ SharedArrayBuffer.prototype.byteLength;
434
+
435
+ /**
436
+ * @param {number=} begin
437
+ * @param {number=} end
438
+ * @return {!SharedArrayBuffer}
439
+ * @nosideeffects
440
+ */
441
+ SharedArrayBuffer.prototype.slice = function(begin, end) {};
442
+
443
+
444
+ /**
445
+ * @typedef {!ArrayBuffer|!ArrayBufferView}
446
+ */
447
+ var BufferSource;
448
+
449
+ /**
450
+ * @typedef {!ArrayBuffer|!ArrayBufferView}
451
+ */
452
+ var AllowSharedBufferSource;
453
+
454
+
455
+ /**
456
+ * @constructor
457
+ * @implements {IArrayLike<number>}
458
+ * @implements {Iterable<number>}
459
+ * @extends {ArrayBufferView}
460
+ * @template TArrayBuffer (unused)
461
+ */
462
+ function TypedArray() {};
463
+
464
+ /** @const {number} */
465
+ TypedArray.prototype.BYTES_PER_ELEMENT;
466
+
467
+ /**
468
+ * NOTE: this is an ES2022 extern.
469
+ * @param {number} index
470
+ * @return {(number|undefined)}
471
+ * @this {THIS}
472
+ * @template THIS
473
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/at
474
+ */
475
+ TypedArray.prototype.at = function(index) {};
476
+
477
+ /**
478
+ * @param {number} target
479
+ * @param {number} start
480
+ * @param {number=} opt_end
481
+ * @return {THIS}
482
+ * @this {THIS}
483
+ * @template THIS
484
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin
485
+ */
486
+ TypedArray.prototype.copyWithin = function(target, start, opt_end) {};
487
+
488
+ /**
489
+ * @return {!IteratorIterable<!Array<number>>}
490
+ * @nosideeffects
491
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/entries
492
+ */
493
+ TypedArray.prototype.entries = function() {};
494
+
495
+ /**
496
+ * @param {function(this:S, number, number, !TypedArray) : *} callback
497
+ * @param {S=} opt_thisArg
498
+ * @return {boolean}
499
+ * @template S
500
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every
501
+ */
502
+ TypedArray.prototype.every = function(callback, opt_thisArg) {};
503
+
504
+ /**
505
+ * @param {number} value
506
+ * @param {number=} opt_begin
507
+ * @param {number=} opt_end
508
+ * @return {THIS}
509
+ * @this {THIS}
510
+ * @template THIS
511
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill
512
+ */
513
+ TypedArray.prototype.fill = function(value, opt_begin, opt_end) {};
514
+
515
+ /**
516
+ * @param {function(this:S, number, number, !TypedArray) : *} callback
517
+ * @param {S=} opt_thisArg
518
+ * @return {THIS}
519
+ * @this {THIS}
520
+ * @template THIS,S
521
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter
522
+ */
523
+ TypedArray.prototype.filter = function(callback, opt_thisArg) {};
524
+
525
+ /**
526
+ * @param {function(this:S, number, number, !TypedArray) : *} callback
527
+ * @param {S=} opt_thisArg
528
+ * @return {(number|undefined)}
529
+ * @template S
530
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find
531
+ */
532
+ TypedArray.prototype.find = function(callback, opt_thisArg) {};
533
+
534
+ /**
535
+ * @param {function(this:S, number, number, !TypedArray) : *} callback
536
+ * @param {S=} opt_thisArg
537
+ * @return {number}
538
+ * @template S
539
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex
540
+ */
541
+ TypedArray.prototype.findIndex = function(callback, opt_thisArg) {};
542
+
543
+ /**
544
+ * @param {function(this:S, number, number, !TypedArray) : boolean} callback
545
+ * @param {S=} opt_thisArg
546
+ * @return {(number|undefined)}
547
+ * @template S
548
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast
549
+ */
550
+ TypedArray.prototype.findLast = function(callback, opt_thisArg) {};
551
+
552
+ /**
553
+ * @param {function(this:S, number, number, !TypedArray) : boolean} callback
554
+ * @param {S=} opt_thisArg
555
+ * @return {number}
556
+ * @template S
557
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex
558
+ */
559
+ TypedArray.prototype.findLastIndex = function(callback, opt_thisArg) {};
560
+
561
+ /**
562
+ * @param {function(this:S, number, number, !TypedArray) : ?} callback
563
+ * @param {S=} opt_thisArg
564
+ * @return {undefined}
565
+ * @template S
566
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach
567
+ */
568
+ TypedArray.prototype.forEach = function(callback, opt_thisArg) {};
569
+
570
+ /**
571
+ * NOTE: this is an ES2016 (ES7) extern.
572
+ * @param {number} searchElement
573
+ * @param {number=} opt_fromIndex
574
+ * @return {boolean}
575
+ * @nosideeffects
576
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes
577
+ */
578
+ TypedArray.prototype.includes = function(searchElement, opt_fromIndex) {};
579
+
580
+ /**
581
+ * @param {number} searchElement
582
+ * @param {number=} opt_fromIndex
583
+ * @return {number}
584
+ * @nosideeffects
585
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf
586
+ */
587
+ TypedArray.prototype.indexOf = function(searchElement, opt_fromIndex) {};
588
+
589
+ /**
590
+ * @param {string=} opt_separator
591
+ * @return {string}
592
+ * @nosideeffects
593
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join
594
+ */
595
+ TypedArray.prototype.join = function(opt_separator) {};
596
+
597
+ /**
598
+ * @return {!IteratorIterable<number>}
599
+ * @nosideeffects
600
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/keys
601
+ */
602
+ TypedArray.prototype.keys = function() {};
603
+
604
+ /**
605
+ * @param {number} searchElement
606
+ * @param {number=} opt_fromIndex
607
+ * @return {number}
608
+ * @nosideeffects
609
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf
610
+ */
611
+ TypedArray.prototype.lastIndexOf = function(searchElement, opt_fromIndex) {};
612
+
613
+ /** @type {number} */
614
+ TypedArray.prototype.length;
615
+
616
+ /**
617
+ * @param {function(this:S, number, number, !TypedArray) : number} callback
618
+ * @param {S=} opt_thisArg
619
+ * @return {THIS}
620
+ * @this {THIS}
621
+ * @template THIS,S
622
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map
623
+ */
624
+ TypedArray.prototype.map = function(callback, opt_thisArg) {};
625
+
626
+ /**
627
+ * @param {function((number|INIT|RET), number, number, !TypedArray) : RET}
628
+ * callback
629
+ * @param {INIT=} opt_initialValue
630
+ * @return {RET}
631
+ * @template INIT,RET
632
+ * @nosideeffects
633
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce
634
+ */
635
+ TypedArray.prototype.reduce = function(callback, opt_initialValue) {};
636
+
637
+ /**
638
+ * @param {function((number|INIT|RET), number, number, !TypedArray) : RET}
639
+ * callback
640
+ * @param {INIT=} opt_initialValue
641
+ * @return {RET}
642
+ * @template INIT,RET
643
+ * @nosideeffects
644
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight
645
+ */
646
+ TypedArray.prototype.reduceRight = function(callback, opt_initialValue) {};
647
+
648
+ /**
649
+ * @return {THIS}
650
+ * @this {THIS}
651
+ * @template THIS
652
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse
653
+ */
654
+ TypedArray.prototype.reverse = function() {};
655
+
656
+ /**
657
+ * @param {!ArrayBufferView|!Array<number>} array
658
+ * @param {number=} opt_offset
659
+ * @return {undefined}
660
+ * @throws {!RangeError}
661
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set
662
+ */
663
+ TypedArray.prototype.set = function(array, opt_offset) {};
664
+
665
+ /**
666
+ * @param {number=} opt_begin
667
+ * @param {number=} opt_end
668
+ * @return {THIS}
669
+ * @this {THIS}
670
+ * @template THIS
671
+ * @nosideeffects
672
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice
673
+ */
674
+ TypedArray.prototype.slice = function(opt_begin, opt_end) {};
675
+
676
+ /**
677
+ * @param {function(this:S, number, number, !TypedArray) : *} callback
678
+ * @param {S=} opt_thisArg
679
+ * @return {boolean}
680
+ * @template S
681
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some
682
+ */
683
+ TypedArray.prototype.some = function(callback, opt_thisArg) {};
684
+
685
+ /**
686
+ * @param {(function(number, number) : number)=} opt_compareFunction
687
+ * @return {THIS}
688
+ * @this {THIS}
689
+ * @template THIS
690
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort
691
+ */
692
+ TypedArray.prototype.sort = function(opt_compareFunction) {};
693
+
694
+ /**
695
+ * @param {number} begin
696
+ * @param {number=} opt_end
697
+ * @return {THIS}
698
+ * @this {THIS}
699
+ * @template THIS
700
+ * @nosideeffects
701
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray
702
+ */
703
+ TypedArray.prototype.subarray = function(begin, opt_end) {};
704
+
705
+ /**
706
+ * @return {!IteratorIterable<number>}
707
+ * @nosideeffects
708
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/values
709
+ */
710
+ TypedArray.prototype.values = function() {};
711
+
712
+ /**
713
+ * @return {string}
714
+ * @nosideeffects
715
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString
716
+ * @override
717
+ */
718
+ TypedArray.prototype.toLocaleString = function() {};
719
+
720
+ /**
721
+ * @return {string}
722
+ * @nosideeffects
723
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString
724
+ * @override
725
+ */
726
+ TypedArray.prototype.toString = function() {};
727
+
728
+ /** @override */
729
+ TypedArray.prototype[Symbol.iterator] = function() {};
730
+
731
+ /**
732
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
733
+ * length or array or buffer
734
+ * NOTE: We require that at least this first argument be present even though
735
+ * the ECMAScript spec allows it to be absent, because this is better
736
+ * for readability and detection of programmer errors.
737
+ * @param {number=} opt_byteOffset
738
+ * @param {number=} opt_length
739
+ * @template TArrayBuffer (unused)
740
+ * @constructor
741
+ * @extends {TypedArray}
742
+ * @throws {Error}
743
+ * @modifies {arguments} If the user passes a backing array, then indexed
744
+ * accesses will modify the backing array. JSCompiler does not model
745
+ * this well. In other words, if you have:
746
+ * <code>
747
+ * var x = new ArrayBuffer(1);
748
+ * var y = new Int8Array(x);
749
+ * y[0] = 2;
750
+ * </code>
751
+ * JSCompiler will not recognize that the last assignment modifies x.
752
+ * We workaround this by marking all these arrays as @modifies {arguments},
753
+ * to introduce the possibility that x aliases y.
754
+ */
755
+ function Int8Array(length, opt_byteOffset, opt_length) {}
756
+
757
+ /** @const {number} */
758
+ Int8Array.BYTES_PER_ELEMENT;
759
+
760
+ /**
761
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
762
+ * @param {function(this:S, ?, number): number=} mapFn
763
+ * @param {S=} thisArg
764
+ * @template S
765
+ * @return {!Int8Array}
766
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
767
+ */
768
+ Int8Array.from = function(source, mapFn, thisArg) {};
769
+
770
+ /**
771
+ * @param {...number} var_args
772
+ * @return {!Int8Array}
773
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
774
+ */
775
+ Int8Array.of = function(var_args) {};
776
+
777
+
778
+ /**
779
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
780
+ * length or array or buffer
781
+ * NOTE: We require that at least this first argument be present even though
782
+ * the ECMAScript spec allows it to be absent, because this is better
783
+ * for readability and detection of programmer errors.
784
+ * @param {number=} opt_byteOffset
785
+ * @param {number=} opt_length
786
+ * @template TArrayBuffer (unused)
787
+ * @constructor
788
+ * @extends {TypedArray}
789
+ * @throws {Error}
790
+ * @modifies {arguments}
791
+ */
792
+ function Uint8Array(length, opt_byteOffset, opt_length) {}
793
+
794
+ /** @const {number} */
795
+ Uint8Array.BYTES_PER_ELEMENT;
796
+
797
+ /**
798
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
799
+ * @param {function(this:S, ?, number): number=} mapFn
800
+ * @param {S=} thisArg
801
+ * @template S
802
+ * @return {!Uint8Array}
803
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
804
+ */
805
+ Uint8Array.from = function(source, mapFn, thisArg) {};
806
+
807
+ /**
808
+ * @param {...number} var_args
809
+ * @return {!Uint8Array}
810
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
811
+ */
812
+ Uint8Array.of = function(var_args) {};
813
+
814
+
815
+ /**
816
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
817
+ * length or array or buffer
818
+ * NOTE: We require that at least this first argument be present even though
819
+ * the ECMAScript spec allows it to be absent, because this is better
820
+ * for readability and detection of programmer errors.
821
+ * @param {number=} opt_byteOffset
822
+ * @param {number=} opt_length
823
+ * @template TArrayBuffer (unused)
824
+ * @constructor
825
+ * @extends {TypedArray}
826
+ * @throws {Error}
827
+ * @modifies {arguments}
828
+ */
829
+ function Uint8ClampedArray(length, opt_byteOffset, opt_length) {}
830
+
831
+ /** @const {number} */
832
+ Uint8ClampedArray.BYTES_PER_ELEMENT;
833
+
834
+ /**
835
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
836
+ * @param {function(this:S, ?, number): number=} mapFn
837
+ * @param {S=} thisArg
838
+ * @template S
839
+ * @return {!Uint8ClampedArray}
840
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
841
+ */
842
+ Uint8ClampedArray.from = function(source, mapFn, thisArg) {};
843
+
844
+ /**
845
+ * @param {...number} var_args
846
+ * @return {!Uint8ClampedArray}
847
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
848
+ */
849
+ Uint8ClampedArray.of = function(var_args) {};
850
+
851
+
852
+ /**
853
+ * @typedef {Uint8ClampedArray}
854
+ * @deprecated CanvasPixelArray has been replaced by Uint8ClampedArray
855
+ * in the latest spec.
856
+ * @see http://www.w3.org/TR/2dcontext/#imagedata
857
+ */
858
+ var CanvasPixelArray;
859
+
860
+
861
+ /**
862
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
863
+ * length or array or buffer
864
+ * NOTE: We require that at least this first argument be present even though
865
+ * the ECMAScript spec allows it to be absent, because this is better
866
+ * for readability and detection of programmer errors.
867
+ * @param {number=} opt_byteOffset
868
+ * @param {number=} opt_length
869
+ * @template TArrayBuffer (unused)
870
+ * @constructor
871
+ * @extends {TypedArray}
872
+ * @throws {Error}
873
+ * @modifies {arguments}
874
+ */
875
+ function Int16Array(length, opt_byteOffset, opt_length) {}
876
+
877
+ /** @const {number} */
878
+ Int16Array.BYTES_PER_ELEMENT;
879
+
880
+ /**
881
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
882
+ * @param {function(this:S, ?, number): number=} mapFn
883
+ * @param {S=} thisArg
884
+ * @template S
885
+ * @return {!Int16Array}
886
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
887
+ */
888
+ Int16Array.from = function(source, mapFn, thisArg) {};
889
+
890
+ /**
891
+ * @param {...number} var_args
892
+ * @return {!Int16Array}
893
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
894
+ */
895
+ Int16Array.of = function(var_args) {};
896
+
897
+
898
+ /**
899
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
900
+ * length or array or buffer
901
+ * NOTE: We require that at least this first argument be present even though
902
+ * the ECMAScript spec allows it to be absent, because this is better
903
+ * for readability and detection of programmer errors.
904
+ * @param {number=} opt_byteOffset
905
+ * @param {number=} opt_length
906
+ * @template TArrayBuffer (unused)
907
+ * @constructor
908
+ * @extends {TypedArray}
909
+ * @throws {Error}
910
+ * @modifies {arguments}
911
+ */
912
+ function Uint16Array(length, opt_byteOffset, opt_length) {}
913
+
914
+ /** @const {number} */
915
+ Uint16Array.BYTES_PER_ELEMENT;
916
+
917
+ /**
918
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
919
+ * @param {function(this:S, ?, number): number=} mapFn
920
+ * @param {S=} thisArg
921
+ * @template S
922
+ * @return {!Uint16Array}
923
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
924
+ */
925
+ Uint16Array.from = function(source, mapFn, thisArg) {};
926
+
927
+ /**
928
+ * @param {...number} var_args
929
+ * @return {!Uint16Array}
930
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
931
+ */
932
+ Uint16Array.of = function(var_args) {};
933
+
934
+
935
+ /**
936
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
937
+ * length or array or buffer
938
+ * NOTE: We require that at least this first argument be present even though
939
+ * the ECMAScript spec allows it to be absent, because this is better
940
+ * for readability and detection of programmer errors.
941
+ * @param {number=} opt_byteOffset
942
+ * @param {number=} opt_length
943
+ * @template TArrayBuffer (unused)
944
+ * @constructor
945
+ * @extends {TypedArray}
946
+ * @throws {Error}
947
+ * @modifies {arguments}
948
+ */
949
+ function Int32Array(length, opt_byteOffset, opt_length) {}
950
+
951
+ /** @const {number} */
952
+ Int32Array.BYTES_PER_ELEMENT;
953
+
954
+ /**
955
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
956
+ * @param {function(this:S, ?, number): number=} mapFn
957
+ * @param {S=} thisArg
958
+ * @template S
959
+ * @return {!Int32Array}
960
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
961
+ */
962
+ Int32Array.from = function(source, mapFn, thisArg) {};
963
+
964
+ /**
965
+ * @param {...number} var_args
966
+ * @return {!Int32Array}
967
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
968
+ */
969
+ Int32Array.of = function(var_args) {};
970
+
971
+
972
+ /**
973
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
974
+ * length or array or buffer
975
+ * NOTE: We require that at least this first argument be present even though
976
+ * the ECMAScript spec allows it to be absent, because this is better
977
+ * for readability and detection of programmer errors.
978
+ * @param {number=} opt_byteOffset
979
+ * @param {number=} opt_length
980
+ * @template TArrayBuffer (unused)
981
+ * @constructor
982
+ * @extends {TypedArray}
983
+ * @throws {Error}
984
+ * @modifies {arguments}
985
+ */
986
+ function Uint32Array(length, opt_byteOffset, opt_length) {}
987
+
988
+ /** @const {number} */
989
+ Uint32Array.BYTES_PER_ELEMENT;
990
+
991
+ /**
992
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
993
+ * @param {function(this:S, ?, number): number=} mapFn
994
+ * @param {S=} thisArg
995
+ * @template S
996
+ * @return {!Uint32Array}
997
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
998
+ */
999
+ Uint32Array.from = function(source, mapFn, thisArg) {};
1000
+
1001
+ /**
1002
+ * @param {...number} var_args
1003
+ * @return {!Uint32Array}
1004
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
1005
+ */
1006
+ Uint32Array.of = function(var_args) {};
1007
+
1008
+
1009
+ /**
1010
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
1011
+ * length or array or buffer
1012
+ * NOTE: We require that at least this first argument be present even though
1013
+ * the ECMAScript spec allows it to be absent, because this is better
1014
+ * for readability and detection of programmer errors.
1015
+ * @param {number=} opt_byteOffset
1016
+ * @param {number=} opt_length
1017
+ * @template TArrayBuffer (unused)
1018
+ * @constructor
1019
+ * @extends {TypedArray}
1020
+ * @throws {Error}
1021
+ * @modifies {arguments}
1022
+ */
1023
+ function Float32Array(length, opt_byteOffset, opt_length) {}
1024
+
1025
+ /** @const {number} */
1026
+ Float32Array.BYTES_PER_ELEMENT;
1027
+
1028
+ /**
1029
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
1030
+ * @param {function(this:S, ?, number): number=} mapFn
1031
+ * @param {S=} thisArg
1032
+ * @template S
1033
+ * @return {!Float32Array}
1034
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
1035
+ */
1036
+ Float32Array.from = function(source, mapFn, thisArg) {};
1037
+
1038
+ /**
1039
+ * @param {...number} var_args
1040
+ * @return {!Float32Array}
1041
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
1042
+ */
1043
+ Float32Array.of = function(var_args) {};
1044
+
1045
+
1046
+ /**
1047
+ * @param {number|ArrayBufferView|Array<number>|ArrayBuffer|SharedArrayBuffer}
1048
+ * length or array or buffer
1049
+ * NOTE: We require that at least this first argument be present even though
1050
+ * the ECMAScript spec allows it to be absent, because this is better
1051
+ * for readability and detection of programmer errors.
1052
+ * @param {number=} opt_byteOffset
1053
+ * @param {number=} opt_length
1054
+ * @template TArrayBuffer (unused)
1055
+ * @constructor
1056
+ * @extends {TypedArray}
1057
+ * @throws {Error}
1058
+ * @modifies {arguments}
1059
+ */
1060
+ function Float64Array(length, opt_byteOffset, opt_length) {}
1061
+
1062
+ /** @const {number} */
1063
+ Float64Array.BYTES_PER_ELEMENT;
1064
+
1065
+ /**
1066
+ * @param {string|!IArrayLike<number>|!Iterable<number>} source
1067
+ * @param {function(this:S, ?, number): number=} mapFn
1068
+ * @param {S=} thisArg
1069
+ * @template S
1070
+ * @return {!Float64Array}
1071
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
1072
+ */
1073
+ Float64Array.from = function(source, mapFn, thisArg) {};
1074
+
1075
+ /**
1076
+ * @param {...number} var_args
1077
+ * @return {!Float64Array}
1078
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
1079
+ */
1080
+ Float64Array.of = function(var_args) {};
1081
+
1082
+
1083
+ /**
1084
+ * @param {number|ArrayBufferView|Array<bigint>|ArrayBuffer|SharedArrayBuffer}
1085
+ * lengthOrArrayOrBuffer
1086
+ * NOTE: We require that at least this first argument be present even though
1087
+ * the ECMAScript spec allows it to be absent, because this is better
1088
+ * for readability and detection of programmer errors.
1089
+ * @param {number=} byteOffset
1090
+ * @param {number=} bufferLength
1091
+ * @template TArrayBuffer (unused)
1092
+ * @constructor
1093
+ * @extends {TypedArray}
1094
+ * @throws {Error}
1095
+ * @modifies {arguments}
1096
+ */
1097
+ function BigInt64Array(lengthOrArrayOrBuffer, byteOffset, bufferLength) {}
1098
+
1099
+ /** @const {number} */
1100
+ BigInt64Array.BYTES_PER_ELEMENT;
1101
+
1102
+ /**
1103
+ * @param {string|!IArrayLike<bigint>|!Iterable<bigint>} source
1104
+ * @param {function(this:S, ?, number): bigint=} mapFn
1105
+ * @param {S=} thisArg
1106
+ * @template S
1107
+ * @return {!BigInt64Array}
1108
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
1109
+ */
1110
+ BigInt64Array.from = function(source, mapFn, thisArg) {};
1111
+
1112
+ /**
1113
+ * @param {...bigint} var_args
1114
+ * @return {!BigInt64Array}
1115
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
1116
+ */
1117
+ BigInt64Array.of = function(var_args) {};
1118
+
1119
+
1120
+ /**
1121
+ * @param {number|ArrayBufferView|Array<bigint>|ArrayBuffer|SharedArrayBuffer}
1122
+ * lengthOrArrayOrBuffer
1123
+ * NOTE: We require that at least this first argument be present even though
1124
+ * the ECMAScript spec allows it to be absent, because this is better
1125
+ * for readability and detection of programmer errors.
1126
+ * @param {number=} byteOffset
1127
+ * @param {number=} bufferLength
1128
+ * @template TArrayBuffer (unused)
1129
+ * @constructor
1130
+ * @extends {TypedArray}
1131
+ * @throws {Error}
1132
+ * @modifies {arguments}
1133
+ */
1134
+ function BigUint64Array(lengthOrArrayOrBuffer, byteOffset, bufferLength) {}
1135
+
1136
+ /** @const {number} */
1137
+ BigUint64Array.BYTES_PER_ELEMENT;
1138
+
1139
+ /**
1140
+ * @param {string|!IArrayLike<bigint>|!Iterable<bigint>} source
1141
+ * @param {function(this:S, ?, number): bigint=} mapFn
1142
+ * @param {S=} thisArg
1143
+ * @template S
1144
+ * @return {!BigUint64Array}
1145
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
1146
+ */
1147
+ BigUint64Array.from = function(source, mapFn, thisArg) {};
1148
+
1149
+ /**
1150
+ * @param {...bigint} var_args
1151
+ * @return {!BigUint64Array}
1152
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of
1153
+ */
1154
+ BigUint64Array.of = function(var_args) {};
1155
+
1156
+ /**
1157
+ * @param {ArrayBuffer|SharedArrayBuffer} buffer
1158
+ * @param {number=} opt_byteOffset
1159
+ * @param {number=} opt_byteLength
1160
+ * @constructor
1161
+ * @extends {ArrayBufferView}
1162
+ * @throws {Error}
1163
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays/DataView
1164
+ */
1165
+ function DataView(buffer, opt_byteOffset, opt_byteLength) {}
1166
+
1167
+ /**
1168
+ * @param {number} byteOffset
1169
+ * @return {number}
1170
+ * @throws {Error}
1171
+ */
1172
+ DataView.prototype.getInt8 = function(byteOffset) {};
1173
+
1174
+ /**
1175
+ * @param {number} byteOffset
1176
+ * @return {number}
1177
+ * @throws {Error}
1178
+ */
1179
+ DataView.prototype.getUint8 = function(byteOffset) {};
1180
+
1181
+ /**
1182
+ * @param {number} byteOffset
1183
+ * @param {boolean=} opt_littleEndian
1184
+ * @return {number}
1185
+ * @throws {Error}
1186
+ */
1187
+ DataView.prototype.getInt16 = function(byteOffset, opt_littleEndian) {};
1188
+
1189
+ /**
1190
+ * @param {number} byteOffset
1191
+ * @param {boolean=} opt_littleEndian
1192
+ * @return {number}
1193
+ * @throws {Error}
1194
+ */
1195
+ DataView.prototype.getUint16 = function(byteOffset, opt_littleEndian) {};
1196
+
1197
+ /**
1198
+ * @param {number} byteOffset
1199
+ * @param {boolean=} opt_littleEndian
1200
+ * @return {number}
1201
+ * @throws {Error}
1202
+ */
1203
+ DataView.prototype.getInt32 = function(byteOffset, opt_littleEndian) {};
1204
+
1205
+ /**
1206
+ * @param {number} byteOffset
1207
+ * @param {boolean=} opt_littleEndian
1208
+ * @return {number}
1209
+ * @throws {Error}
1210
+ */
1211
+ DataView.prototype.getUint32 = function(byteOffset, opt_littleEndian) {};
1212
+
1213
+ /**
1214
+ * @param {number} byteOffset
1215
+ * @param {boolean=} opt_littleEndian
1216
+ * @return {number}
1217
+ * @throws {Error}
1218
+ */
1219
+ DataView.prototype.getFloat32 = function(byteOffset, opt_littleEndian) {};
1220
+
1221
+ /**
1222
+ * @param {number} byteOffset
1223
+ * @param {boolean=} opt_littleEndian
1224
+ * @return {number}
1225
+ * @throws {Error}
1226
+ */
1227
+ DataView.prototype.getFloat64 = function(byteOffset, opt_littleEndian) {};
1228
+
1229
+ /**
1230
+ * @param {number} byteOffset
1231
+ * @param {boolean=} littleEndian
1232
+ * @return {bigint}
1233
+ * @throws {Error}
1234
+ */
1235
+ DataView.prototype.getBigInt64 = function(byteOffset, littleEndian) {};
1236
+
1237
+ /**
1238
+ * @param {number} byteOffset
1239
+ * @param {boolean=} littleEndian
1240
+ * @return {bigint}
1241
+ * @throws {Error}
1242
+ */
1243
+ DataView.prototype.getBigUint64 = function(byteOffset, littleEndian) {};
1244
+
1245
+ /**
1246
+ * @param {number} byteOffset
1247
+ * @param {number} value
1248
+ * @throws {Error}
1249
+ * @return {undefined}
1250
+ */
1251
+ DataView.prototype.setInt8 = function(byteOffset, value) {};
1252
+
1253
+ /**
1254
+ * @param {number} byteOffset
1255
+ * @param {number} value
1256
+ * @throws {Error}
1257
+ * @return {undefined}
1258
+ */
1259
+ DataView.prototype.setUint8 = function(byteOffset, value) {};
1260
+
1261
+ /**
1262
+ * @param {number} byteOffset
1263
+ * @param {number} value
1264
+ * @param {boolean=} opt_littleEndian
1265
+ * @throws {Error}
1266
+ * @return {undefined}
1267
+ */
1268
+ DataView.prototype.setInt16 = function(byteOffset, value, opt_littleEndian) {};
1269
+
1270
+ /**
1271
+ * @param {number} byteOffset
1272
+ * @param {number} value
1273
+ * @param {boolean=} opt_littleEndian
1274
+ * @throws {Error}
1275
+ * @return {undefined}
1276
+ */
1277
+ DataView.prototype.setUint16 = function(byteOffset, value, opt_littleEndian) {};
1278
+
1279
+ /**
1280
+ * @param {number} byteOffset
1281
+ * @param {number} value
1282
+ * @param {boolean=} opt_littleEndian
1283
+ * @throws {Error}
1284
+ * @return {undefined}
1285
+ */
1286
+ DataView.prototype.setInt32 = function(byteOffset, value, opt_littleEndian) {};
1287
+
1288
+ /**
1289
+ * @param {number} byteOffset
1290
+ * @param {number} value
1291
+ * @param {boolean=} opt_littleEndian
1292
+ * @throws {Error}
1293
+ * @return {undefined}
1294
+ */
1295
+ DataView.prototype.setUint32 = function(byteOffset, value, opt_littleEndian) {};
1296
+
1297
+ /**
1298
+ * @param {number} byteOffset
1299
+ * @param {number} value
1300
+ * @param {boolean=} opt_littleEndian
1301
+ * @throws {Error}
1302
+ * @return {undefined}
1303
+ */
1304
+ DataView.prototype.setFloat32 = function(
1305
+ byteOffset, value, opt_littleEndian) {};
1306
+
1307
+ /**
1308
+ * @param {number} byteOffset
1309
+ * @param {number} value
1310
+ * @param {boolean=} opt_littleEndian
1311
+ * @throws {Error}
1312
+ * @return {undefined}
1313
+ */
1314
+ DataView.prototype.setFloat64 = function(
1315
+ byteOffset, value, opt_littleEndian) {};
1316
+
1317
+ /**
1318
+ * @param {number} byteOffset
1319
+ * @param {bigint} value
1320
+ * @param {boolean=} littleEndian
1321
+ * @throws {Error}
1322
+ * @return {undefined}
1323
+ */
1324
+ DataView.prototype.setBigInt64 = function(byteOffset, value, littleEndian) {};
1325
+
1326
+ /**
1327
+ * @param {number} byteOffset
1328
+ * @param {bigint} value
1329
+ * @param {boolean=} littleEndian
1330
+ * @throws {Error}
1331
+ * @return {undefined}
1332
+ */
1333
+ DataView.prototype.setBigUint64 = function(byteOffset, value, littleEndian) {};
1334
+
1335
+
1336
+ /**
1337
+ * @see https://github.com/promises-aplus/promises-spec
1338
+ * @typedef {{then: ?}}
1339
+ */
1340
+ var Thenable;
1341
+
1342
+
1343
+ /**
1344
+ * This is not an official DOM interface. It is used to add generic typing
1345
+ * and respective type inference where available.
1346
+ * {@see goog.Thenable} inherits from this making all promises
1347
+ * interoperate.
1348
+ * @interface
1349
+ * @struct
1350
+ * @template TYPE
1351
+ */
1352
+ function IThenable() {}
1353
+
1354
+
1355
+ /**
1356
+ * @param {?(function(TYPE):VALUE)=} opt_onFulfilled
1357
+ * @param {?(function(*): *)=} opt_onRejected
1358
+ * @return {RESULT}
1359
+ * @template VALUE
1360
+ *
1361
+ * When a `Thenable` is fulfilled or rejected with another `Thenable`, the
1362
+ * payload of the second is used as the payload of the first.
1363
+ *
1364
+ * @template RESULT := type('IThenable',
1365
+ * cond(isUnknown(VALUE), unknown(),
1366
+ * mapunion(VALUE, (V) =>
1367
+ * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1368
+ * templateTypeOf(V, 0),
1369
+ * cond(sub(V, 'Thenable'),
1370
+ * unknown(),
1371
+ * V)))))
1372
+ * =:
1373
+ */
1374
+ IThenable.prototype.then = function(opt_onFulfilled, opt_onRejected) {};
1375
+
1376
+
1377
+ /**
1378
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
1379
+ * @param {function(
1380
+ * function((TYPE|IThenable<TYPE>|Thenable|null)=),
1381
+ * function(*=))} resolver
1382
+ * @constructor
1383
+ * @implements {IThenable<TYPE>}
1384
+ * @template TYPE
1385
+ */
1386
+ function Promise(resolver) {}
1387
+
1388
+
1389
+ /**
1390
+ * @param {VALUE=} opt_value
1391
+ * @return {RESULT}
1392
+ * @template VALUE
1393
+ * @template RESULT := type('Promise',
1394
+ * cond(isUnknown(VALUE), unknown(),
1395
+ * mapunion(VALUE, (V) =>
1396
+ * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1397
+ * templateTypeOf(V, 0),
1398
+ * cond(sub(V, 'Thenable'),
1399
+ * unknown(),
1400
+ * V)))))
1401
+ * =:
1402
+ */
1403
+ Promise.resolve = function(opt_value) {};
1404
+
1405
+
1406
+ /**
1407
+ * @param {*=} opt_error
1408
+ * @return {!Promise<?>}
1409
+ */
1410
+ Promise.reject = function(opt_error) {};
1411
+
1412
+
1413
+ /**
1414
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
1415
+ * @param {!Iterable<VALUE>} iterable
1416
+ * @return {!Promise<!Array<RESULT>>}
1417
+ * @template VALUE
1418
+ * @template RESULT := mapunion(VALUE, (V) =>
1419
+ * cond(isUnknown(V),
1420
+ * unknown(),
1421
+ * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1422
+ * templateTypeOf(V, 0),
1423
+ * cond(sub(V, 'Thenable'), unknown(), V))))
1424
+ * =:
1425
+ */
1426
+ Promise.all = function(iterable) {};
1427
+
1428
+ /**
1429
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
1430
+ * @param {!Iterable<VALUE>} iterable
1431
+ * @return {!Promise<RESULT>}
1432
+ * @template VALUE
1433
+ * @template RESULT := mapunion(VALUE, (V) =>
1434
+ * cond(isUnknown(V),
1435
+ * unknown(),
1436
+ * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1437
+ * templateTypeOf(V, 0),
1438
+ * cond(sub(V, 'Thenable'), unknown(), V))))
1439
+ * =:
1440
+ */
1441
+ Promise.any = function(iterable) {};
1442
+
1443
+ /**
1444
+ * Record type representing a single element of the array value one gets from
1445
+ * Promise.allSettled.
1446
+ *
1447
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled
1448
+ * @record
1449
+ * @template VALUE
1450
+ */
1451
+ Promise.AllSettledResultElement = function() {};
1452
+
1453
+ /**
1454
+ * 'fulfilled' or 'rejected' to indicate the final state of the corresponding
1455
+ * Promise.
1456
+ * @type {string}
1457
+ */
1458
+ Promise.AllSettledResultElement.prototype.status;
1459
+
1460
+ /**
1461
+ * Exists only if the status field is 'fulfilled'
1462
+ * @type {VALUE|undefined}
1463
+ */
1464
+ Promise.AllSettledResultElement.prototype.value;
1465
+
1466
+ /**
1467
+ * Exists only if the status field is 'rejected'
1468
+ * @type {*|undefined}
1469
+ */
1470
+ Promise.AllSettledResultElement.prototype.reason;
1471
+
1472
+ /**
1473
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled
1474
+ * @param {!Iterable<VALUE>} iterable
1475
+ * @return {!Promise<!Array<!Promise.AllSettledResultElement<RESULT>>>}
1476
+ * @template VALUE
1477
+ * @template RESULT := mapunion(VALUE, (V) =>
1478
+ * cond(isUnknown(V),
1479
+ * unknown(),
1480
+ * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1481
+ * templateTypeOf(V, 0),
1482
+ * cond(sub(V, 'Thenable'), unknown(), V))))
1483
+ * =:
1484
+ */
1485
+ Promise.allSettled = function(iterable) {};
1486
+
1487
+
1488
+ /**
1489
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
1490
+ * @param {!Iterable<VALUE>} iterable
1491
+ * @return {!Promise<RESULT>}
1492
+ * @template VALUE
1493
+ * @template RESULT := mapunion(VALUE, (V) =>
1494
+ * cond(isUnknown(V),
1495
+ * unknown(),
1496
+ * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1497
+ * templateTypeOf(V, 0),
1498
+ * cond(sub(V, 'Thenable'), unknown(), V))))
1499
+ * =:
1500
+ */
1501
+ Promise.race = function(iterable) {};
1502
+
1503
+ /**
1504
+ * Record type representing the return of Promise.withResolvers.
1505
+ *
1506
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
1507
+ * @record
1508
+ * @template VALUE
1509
+ */
1510
+ Promise.PromiseWithResolvers = function() {};
1511
+
1512
+ /**
1513
+ * @type {!Promise<VALUE>}
1514
+ */
1515
+ Promise.PromiseWithResolvers.prototype.promise;
1516
+
1517
+ /**
1518
+ * @type {function((VALUE|IThenable<VALUE>|Thenable)=)}
1519
+ */
1520
+ Promise.PromiseWithResolvers.prototype.resolve;
1521
+
1522
+ /**
1523
+ * @type {function(*=)}
1524
+ */
1525
+ Promise.PromiseWithResolvers.prototype.reject;
1526
+
1527
+ /**
1528
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
1529
+ * @return {!Promise.PromiseWithResolvers<VALUE>}
1530
+ * @template VALUE
1531
+ */
1532
+ Promise.withResolvers = function() {};
1533
+
1534
+ /**
1535
+ * @param {?(function(this:void, TYPE):VALUE)=} opt_onFulfilled
1536
+ * @param {?(function(this:void, *): *)=} opt_onRejected
1537
+ * @return {RESULT}
1538
+ * @template VALUE
1539
+ *
1540
+ * When a `Thenable` is fulfilled or rejected with another `Thenable`, the
1541
+ * payload of the second is used as the payload of the first.
1542
+ *
1543
+ * @template RESULT := type('Promise',
1544
+ * cond(isUnknown(VALUE), unknown(),
1545
+ * mapunion(VALUE, (V) =>
1546
+ * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1547
+ * templateTypeOf(V, 0),
1548
+ * cond(sub(V, 'Thenable'),
1549
+ * unknown(),
1550
+ * V)))))
1551
+ * =:
1552
+ * @override
1553
+ */
1554
+ Promise.prototype.then = function(opt_onFulfilled, opt_onRejected) {};
1555
+
1556
+
1557
+ /**
1558
+ * @param {function(*):VALUE} onRejected
1559
+ * @return {!Promise<TYPE|RESULT>} A Promise of the original type or a possibly
1560
+ * a different type depending on whether the parent promise was rejected.
1561
+ *
1562
+ * @template VALUE
1563
+ *
1564
+ * When a `Thenable` is rejected with another `Thenable`, the payload of the
1565
+ * second is used as the payload of the first.
1566
+ *
1567
+ * @template RESULT := cond(
1568
+ * isUnknown(VALUE),
1569
+ * unknown(),
1570
+ * mapunion(VALUE, (V) =>
1571
+ * cond(
1572
+ * isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),
1573
+ * templateTypeOf(V, 0),
1574
+ * cond(
1575
+ * sub(V, 'Thenable'),
1576
+ * unknown(),
1577
+ * V))))
1578
+ * =:
1579
+ */
1580
+ Promise.prototype.catch = function(onRejected) {};
1581
+
1582
+
1583
+ /**
1584
+ * @param {function()} callback
1585
+ * @return {!Promise<TYPE>}
1586
+ */
1587
+ Promise.prototype.finally = function(callback) {};
1588
+
1589
+
1590
+ /**
1591
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of
1592
+ * @param {...T} var_args
1593
+ * @return {!Array<T>}
1594
+ * @template T
1595
+ */
1596
+ Array.of = function(var_args) {};
1597
+
1598
+
1599
+ /**
1600
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from
1601
+ * @param {string|!IArrayLike<T>|!Iterable<T>} arrayLike
1602
+ * @param {function(this:S, (string|T), number): R=} opt_mapFn
1603
+ * @param {S=} opt_this
1604
+ * @return {!Array<R>}
1605
+ * @template T,S,R
1606
+ */
1607
+ Array.from = function(arrayLike, opt_mapFn, opt_this) {};
1608
+
1609
+
1610
+ /**
1611
+ * @override
1612
+ * @return {!IteratorIterable<number>}
1613
+ */
1614
+ Array.prototype.keys;
1615
+
1616
+
1617
+ /**
1618
+ * @override
1619
+ * @return {!IteratorIterable<T>}
1620
+ * @nosideeffects
1621
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values
1622
+ */
1623
+ Array.prototype.values;
1624
+
1625
+
1626
+ /**
1627
+ * @override
1628
+ * @return {!IteratorIterable<!Array<number|T>>} Iterator of [key, value] pairs.
1629
+ */
1630
+ Array.prototype.entries;
1631
+
1632
+
1633
+ /**
1634
+ * @override
1635
+ * @param {function(this:S, T, number, !Array<T>): *} predicateFn
1636
+ * @param {S=} opt_this
1637
+ * @return {T|undefined}
1638
+ * @this {IArrayLike<T>|string}
1639
+ * @template T,S
1640
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.find
1641
+ */
1642
+ Array.prototype.find = function(predicateFn, opt_this) {};
1643
+
1644
+
1645
+ /**
1646
+ * @override
1647
+ * @param {function(this:S, T, number, !Array<T>): *} predicateFn
1648
+ * @param {S=} opt_this
1649
+ * @return {number}
1650
+ * @this {IArrayLike<T>|string}
1651
+ * @template T,S
1652
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.findindex
1653
+ */
1654
+ Array.prototype.findIndex = function(predicateFn, opt_this) {};
1655
+
1656
+ /**
1657
+ * NOTE: this is an ES2023 extern.
1658
+ * @override
1659
+ * @param {function(this:S, T, number, !Array<T>): boolean} predicateFn
1660
+ * @param {S=} opt_this
1661
+ * @return {T|undefined}
1662
+ * @this {IArrayLike<T>|string}
1663
+ * @template T,S
1664
+ * @see https://tc39.es/ecma262/#sec-array.prototype.findlast
1665
+ */
1666
+ Array.prototype.findLast = function(predicateFn, opt_this) {};
1667
+
1668
+
1669
+ /**
1670
+ * NOTE: this is an ES2023 extern.
1671
+ * @override
1672
+ * @param {function(this:S, T, number, !Array<T>): boolean} predicateFn
1673
+ * @param {S=} opt_this
1674
+ * @return {number}
1675
+ * @this {IArrayLike<T>|string}
1676
+ * @template T,S
1677
+ * @see https://tc39.es/ecma262/#sec-array.prototype.findlastindex
1678
+ */
1679
+ Array.prototype.findLastIndex = function(predicateFn, opt_this) {};
1680
+
1681
+ /**
1682
+ * @param {T} value
1683
+ * @param {number=} opt_begin
1684
+ * @param {number=} opt_end
1685
+ * @return {!Array<T>}
1686
+ * @this {!IArrayLike<T>|string}
1687
+ * @template T
1688
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.fill
1689
+ */
1690
+ Array.prototype.fill = function(value, opt_begin, opt_end) {};
1691
+
1692
+
1693
+ /**
1694
+ * @param {number} target
1695
+ * @param {number} start
1696
+ * @param {number=} opt_end
1697
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.copywithin
1698
+ * @this {!IArrayLike<T>|string}
1699
+ * @template T
1700
+ * @return {!Array<T>}
1701
+ */
1702
+ Array.prototype.copyWithin = function(target, start, opt_end) {};
1703
+
1704
+
1705
+ /**
1706
+ * NOTE: this is an ES2022 extern.
1707
+ * @override
1708
+ * @param {number} index
1709
+ * @return {T}
1710
+ * @this {!IArrayLike<T>|string}
1711
+ * @template T
1712
+ * @nosideeffects
1713
+ * @see https://tc39.github.io/ecma262/#sec-array.prototype.at
1714
+ */
1715
+ Array.prototype.at = function(index) {};
1716
+
1717
+ /**
1718
+ * NOTE: this is an ES2016 (ES7) extern.
1719
+ * @override
1720
+ * @param {T} searchElement
1721
+ * @param {number=} opt_fromIndex
1722
+ * @return {boolean}
1723
+ * @this {!IArrayLike<T>|string}
1724
+ * @template T
1725
+ * @nosideeffects
1726
+ * @see https://tc39.github.io/ecma262/#sec-array.prototype.includes
1727
+ */
1728
+ Array.prototype.includes = function(searchElement, opt_fromIndex) {};
1729
+
1730
+ /**
1731
+ * Generates an array by passing every element of this array to a callback that
1732
+ * returns an array of zero or more elements to be added to the result.
1733
+ *
1734
+ * NOTE: The specified behavior of the method is that the callback can return
1735
+ * either an Array, which will be flattened into the result, or a non-array,
1736
+ * which will simply be included.
1737
+ *
1738
+ * However, while defining that in the type information here is possible it's
1739
+ * very hard to understand both for humans and automated tools other than
1740
+ * closure-compiler that process these files. Also, we think it's best to
1741
+ * encourage writing callbacks that just always return an Array for the sake
1742
+ * of readability.
1743
+ *
1744
+ * The polyfill for this method provided by closure-compiler does behave as
1745
+ * defined in the specification, though.
1746
+ *
1747
+ * @override
1748
+ * @param {function(this: THIS, T, number, !IArrayLike<T>): !ReadonlyArray<S>}
1749
+ * callback
1750
+ * @param {THIS=} thisArg
1751
+ * @return {!Array<S>}
1752
+ * @this {!IArrayLike<T>}
1753
+ * @template T, THIS, S
1754
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap
1755
+ */
1756
+ Array.prototype.flatMap = function(callback, thisArg) {};
1757
+
1758
+ /**
1759
+ * @override
1760
+ * @param {number=} depth
1761
+ * @return {!Array<S>}
1762
+ * @this {!IArrayLike<T>}
1763
+ * @template T, S
1764
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat
1765
+ */
1766
+ Array.prototype.flat = function(depth) {};
1767
+
1768
+ /** @return {!IteratorIterable<number>} */
1769
+ ReadonlyArray.prototype.keys;
1770
+
1771
+
1772
+ /**
1773
+ * @return {!IteratorIterable<T>}
1774
+ * @nosideeffects
1775
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values
1776
+ */
1777
+ ReadonlyArray.prototype.values;
1778
+
1779
+
1780
+ /**
1781
+ * @return {!IteratorIterable<!Array<number|T>>} Iterator of [key, value] pairs.
1782
+ */
1783
+ ReadonlyArray.prototype.entries;
1784
+
1785
+
1786
+ /**
1787
+ * @param {function(this:S, T, number, !Array<T>): *} predicateFn
1788
+ * @param {S=} opt_this
1789
+ * @return {T|undefined}
1790
+ * @this {IArrayLike<T>|string}
1791
+ * @template T,S
1792
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.find
1793
+ */
1794
+ ReadonlyArray.prototype.find = function(predicateFn, opt_this) {};
1795
+
1796
+
1797
+ /**
1798
+ * @param {function(this:S, T, number, !Array<T>): *} predicateFn
1799
+ * @param {S=} opt_this
1800
+ * @return {number}
1801
+ * @this {IArrayLike<T>|string}
1802
+ * @template T,S
1803
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.findindex
1804
+ */
1805
+ ReadonlyArray.prototype.findIndex = function(predicateFn, opt_this) {};
1806
+
1807
+ /**
1808
+ * NOTE: this is an ES2023 extern.
1809
+ * @param {function(this:S, T, number, !Array<T>): boolean} predicateFn
1810
+ * @param {S=} opt_this
1811
+ * @return {T|undefined}
1812
+ * @this {IArrayLike<T>|string}
1813
+ * @template T,S
1814
+ * @see https://tc39.es/ecma262/#sec-array.prototype.findlast
1815
+ */
1816
+ ReadonlyArray.prototype.findLast = function(predicateFn, opt_this) {};
1817
+
1818
+
1819
+ /**
1820
+ * NOTE: this is an ES2023 extern.
1821
+ * @param {function(this:S, T, number, !Array<T>): boolean} predicateFn
1822
+ * @param {S=} opt_this
1823
+ * @return {number}
1824
+ * @this {IArrayLike<T>|string}
1825
+ * @template T,S
1826
+ * @see https://tc39.es/ecma262/#sec-array.prototype.findlastindex
1827
+ */
1828
+ ReadonlyArray.prototype.findLastIndex = function(predicateFn, opt_this) {};
1829
+
1830
+
1831
+ /**
1832
+ * NOTE: this is an ES2022 extern.
1833
+ * @param {number} index
1834
+ * @return {T}
1835
+ * @this {!IArrayLike<T>|string}
1836
+ * @template T
1837
+ * @nosideeffects
1838
+ * @see https://tc39.github.io/ecma262/#sec-array.prototype.at
1839
+ */
1840
+ ReadonlyArray.prototype.at = function(index) {};
1841
+
1842
+ /**
1843
+ * NOTE: this is an ES2016 (ES7) extern.
1844
+ * @param {?} searchElement
1845
+ * @param {number=} opt_fromIndex
1846
+ * @return {boolean}
1847
+ * @this {!IArrayLike<T>|string}
1848
+ * @template T
1849
+ * @nosideeffects
1850
+ * @see https://tc39.github.io/ecma262/#sec-array.prototype.includes
1851
+ */
1852
+ ReadonlyArray.prototype.includes = function(searchElement, opt_fromIndex) {};
1853
+
1854
+ /**
1855
+ * Generates an array by passing every element of this array to a callback that
1856
+ * returns an array of zero or more elements to be added to the result.
1857
+ *
1858
+ * NOTE: The specified behavior of the method is that the callback can return
1859
+ * either an Array, which will be flattened into the result, or a non-array,
1860
+ * which will simply be included.
1861
+ *
1862
+ * However, while defining that in the type information here is possible it's
1863
+ * very hard to understand both for humans and automated tools other than
1864
+ * closure-compiler that process these files. Also, we think it's best to
1865
+ * encourage writing callbacks that just always return an Array for the sake
1866
+ * of readability.
1867
+ *
1868
+ * The polyfill for this method provided by closure-compiler does behave as
1869
+ * defined in the specification, though.
1870
+ *
1871
+ * @param {function(this: THIS, T, number, !IArrayLike<T>): !ReadonlyArray<S>}
1872
+ * callback
1873
+ * @param {THIS=} thisArg
1874
+ * @return {!Array<S>}
1875
+ * @this {!IArrayLike<T>}
1876
+ * @template T, THIS, S
1877
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap
1878
+ */
1879
+ ReadonlyArray.prototype.flatMap = function(callback, thisArg) {};
1880
+
1881
+ /**
1882
+ * @param {number=} depth
1883
+ * @return {!Array<S>}
1884
+ * @this {!IArrayLike<T>}
1885
+ * @template T, S
1886
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat
1887
+ */
1888
+ ReadonlyArray.prototype.flat = function(depth) {};
1889
+
1890
+ /**
1891
+ * @param {!Iterable<*>} errors
1892
+ * @param {string} message
1893
+ * @constructor
1894
+ * @extends {Error}
1895
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError/AggregateError
1896
+ */
1897
+ var AggregateError = function(errors, message) {};
1898
+
1899
+ /** @type {!Array<!Error>} */
1900
+ AggregateError.prototype.errors;
1901
+
1902
+ /** @type {string} */
1903
+ AggregateError.prototype.message;
1904
+
1905
+ /**
1906
+ * @param {!Object} obj
1907
+ * @return {!Array<symbol>}
1908
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-object.getownpropertysymbols
1909
+ */
1910
+ Object.getOwnPropertySymbols = function(obj) {};
1911
+
1912
+
1913
+ /**
1914
+ * @param {!Object} obj
1915
+ * @param {?} proto
1916
+ * @return {!Object}
1917
+ * @see http://www.ecma-international.org/ecma-262/6.0/#sec-object.setprototypeof
1918
+ */
1919
+ Object.setPrototypeOf = function(obj, proto) {};
1920
+
1921
+
1922
+ /**
1923
+ * @const {number}
1924
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON
1925
+ */
1926
+ Number.EPSILON;
1927
+
1928
+ /**
1929
+ * @const {number}
1930
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER
1931
+ */
1932
+ Number.MIN_SAFE_INTEGER;
1933
+
1934
+ /**
1935
+ * @const {number}
1936
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
1937
+ */
1938
+ Number.MAX_SAFE_INTEGER;
1939
+
1940
+
1941
+
1942
+ /**
1943
+ * Parse an integer. Use of `parseInt` without `base` is strictly
1944
+ * banned in Google. If you really want to parse octal or hex based on the
1945
+ * leader, then pass `undefined` as the base.
1946
+ *
1947
+ * @param {string} string
1948
+ * @param {number|undefined} radix
1949
+ * @return {number}
1950
+ * @nosideeffects
1951
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt
1952
+ */
1953
+ Number.parseInt = function(string, radix) {};
1954
+
1955
+ /**
1956
+ * @param {string} string
1957
+ * @return {number}
1958
+ * @nosideeffects
1959
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat
1960
+ */
1961
+ Number.parseFloat = function(string) {};
1962
+
1963
+ /**
1964
+ * @param {*} value
1965
+ * @return {boolean}
1966
+ * @nosideeffects
1967
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
1968
+ */
1969
+ Number.isNaN = function(value) {};
1970
+
1971
+ /**
1972
+ * @param {*} value
1973
+ * @return {boolean}
1974
+ * @nosideeffects
1975
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite
1976
+ */
1977
+ Number.isFinite = function(value) {};
1978
+
1979
+ /**
1980
+ * @param {*} value
1981
+ * @return {boolean}
1982
+ * @nosideeffects
1983
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger
1984
+ */
1985
+ Number.isInteger = function(value) {};
1986
+
1987
+ /**
1988
+ * @param {*} value
1989
+ * @return {boolean}
1990
+ * @nosideeffects
1991
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger
1992
+ */
1993
+ Number.isSafeInteger = function(value) {};
1994
+
1995
+
1996
+
1997
+ /**
1998
+ * @param {!Object} target
1999
+ * @param {...(Object|null|undefined)} var_args
2000
+ * @return {!Object}
2001
+ * @modifies {arguments}
2002
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
2003
+ */
2004
+ Object.assign = function(target, var_args) {};
2005
+
2006
+ /**
2007
+ * TODO(dbeam): find a better place for ES2017 externs like this one.
2008
+ * NOTE: this is an ES2017 (ES8) extern.
2009
+ * @param {!Object<T>} obj
2010
+ * @return {!Array<T>} values
2011
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values
2012
+ * @throws {Error}
2013
+ * @template T
2014
+ */
2015
+ Object.values = function(obj) {};
2016
+
2017
+ /**
2018
+ * NOTE: this is an ES2017 (ES8) extern.
2019
+ * @param {!Object<T>} obj
2020
+ * @return {!Array<!Array<(string|T)>>} entries
2021
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
2022
+ * @throws {Error}
2023
+ * @template T
2024
+ */
2025
+ Object.entries = function(obj) {};
2026
+
2027
+ /**
2028
+ * NOTE: this is an ES2022 extern.
2029
+ * Returns whether the specified object has indicated property as its own
2030
+ * property.
2031
+ * @param {!Object} obj
2032
+ * @param {string|symbol} propertyName
2033
+ * @return {boolean}
2034
+ * @nosideeffects
2035
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn
2036
+ */
2037
+ Object.hasOwn = function(obj, propertyName) {};
2038
+
2039
+ /**
2040
+ * @param {!Iterable<*>} iter
2041
+ * @return {!Object}
2042
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries
2043
+ */
2044
+ Object.fromEntries = function(iter) {};
2045
+
2046
+ /**
2047
+ * NOTE: this is an ES2017 (ES8) extern.
2048
+ * @param {!Object} obj
2049
+ * @return {!Object<!ObjectPropertyDescriptor>} descriptors
2050
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors
2051
+ * @throws {Error}
2052
+ * @template T
2053
+ */
2054
+ Object.getOwnPropertyDescriptors = function(obj) {};
2055
+
2056
+
2057
+
2058
+ /**
2059
+ * @const
2060
+ * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect
2061
+ */
2062
+ var Reflect = {};
2063
+
2064
+ /**
2065
+ * @param {function(this: THIS, ...?): RESULT} targetFn
2066
+ * @param {THIS} thisArg
2067
+ * @param {!Array<?>} argList
2068
+ * @return {RESULT}
2069
+ * @template THIS, RESULT
2070
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/apply
2071
+ */
2072
+ Reflect.apply = function(targetFn, thisArg, argList) {};
2073
+
2074
+ /**
2075
+ * @param {function(new: ?, ...?)} targetConstructorFn
2076
+ * @param {!Array<?>} argList
2077
+ * @param {function(new: TARGET, ...?)=} opt_newTargetConstructorFn
2078
+ * @return {TARGET}
2079
+ * @template TARGET
2080
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/construct
2081
+ */
2082
+ Reflect.construct = function(
2083
+ targetConstructorFn, argList, opt_newTargetConstructorFn) {};
2084
+
2085
+ /**
2086
+ * @param {!Object} target
2087
+ * @param {string} propertyKey
2088
+ * @param {!ObjectPropertyDescriptor} attributes
2089
+ * @return {boolean}
2090
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty
2091
+ */
2092
+ Reflect.defineProperty = function(target, propertyKey, attributes) {};
2093
+
2094
+ /**
2095
+ * @param {!Object} target
2096
+ * @param {string} propertyKey
2097
+ * @return {boolean}
2098
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/deleteProperty
2099
+ */
2100
+ Reflect.deleteProperty = function(target, propertyKey) {};
2101
+
2102
+ /**
2103
+ * @param {!Object} target
2104
+ * @param {string} propertyKey
2105
+ * @param {!Object=} opt_receiver
2106
+ * @return {*}
2107
+ * @nosideeffects
2108
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/get
2109
+ */
2110
+ Reflect.get = function(target, propertyKey, opt_receiver) {};
2111
+
2112
+ /**
2113
+ * @param {!Object} target
2114
+ * @param {string} propertyKey
2115
+ * @return {?ObjectPropertyDescriptor}
2116
+ * @nosideeffects
2117
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/getOwnPropertyDescriptor
2118
+ */
2119
+ Reflect.getOwnPropertyDescriptor = function(target, propertyKey) {};
2120
+
2121
+ /**
2122
+ * @param {!Object} target
2123
+ * @return {?Object}
2124
+ * @nosideeffects
2125
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/getPrototypeOf
2126
+ */
2127
+ Reflect.getPrototypeOf = function(target) {};
2128
+
2129
+ /**
2130
+ * @param {!Object} target
2131
+ * @param {string} propertyKey
2132
+ * @return {boolean}
2133
+ * @nosideeffects
2134
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/has
2135
+ */
2136
+ Reflect.has = function(target, propertyKey) {};
2137
+
2138
+ /**
2139
+ * @param {!Object} target
2140
+ * @return {boolean}
2141
+ * @nosideeffects
2142
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible
2143
+ */
2144
+ Reflect.isExtensible = function(target) {};
2145
+
2146
+ /**
2147
+ * @param {!Object} target
2148
+ * @return {!Array<(string|symbol)>}
2149
+ * @nosideeffects
2150
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys
2151
+ */
2152
+ Reflect.ownKeys = function(target) {};
2153
+
2154
+ /**
2155
+ * @param {!Object} target
2156
+ * @return {boolean}
2157
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions
2158
+ */
2159
+ Reflect.preventExtensions = function(target) {};
2160
+
2161
+ /**
2162
+ * @param {!Object} target
2163
+ * @param {string} propertyKey
2164
+ * @param {*} value
2165
+ * @param {!Object=} opt_receiver
2166
+ * @return {boolean}
2167
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/set
2168
+ */
2169
+ Reflect.set = function(target, propertyKey, value, opt_receiver) {};
2170
+
2171
+ /**
2172
+ * @param {!Object} target
2173
+ * @param {?Object} proto
2174
+ * @return {boolean}
2175
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/setPrototypeOf
2176
+ */
2177
+ Reflect.setPrototypeOf = function(target, proto) {};
2178
+
2179
+
2180
+ /**
2181
+ * @const
2182
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics
2183
+ */
2184
+ var Atomics = {};
2185
+
2186
+ /**
2187
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2188
+ * typedArray
2189
+ * @param {number} index
2190
+ * @param {number} value
2191
+ * @return {number}
2192
+ */
2193
+ Atomics.add = function(typedArray, index, value) {};
2194
+
2195
+ /**
2196
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2197
+ * typedArray
2198
+ * @param {number} index
2199
+ * @param {number} value
2200
+ * @return {number}
2201
+ */
2202
+ Atomics.and = function(typedArray, index, value) {};
2203
+
2204
+ /**
2205
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2206
+ * typedArray
2207
+ * @param {number} index
2208
+ * @param {number} expectedValue
2209
+ * @param {number} replacementValue
2210
+ * @return {number}
2211
+ */
2212
+ Atomics.compareExchange = function(
2213
+ typedArray, index, expectedValue, replacementValue) {};
2214
+
2215
+ /**
2216
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2217
+ * typedArray
2218
+ * @param {number} index
2219
+ * @param {number} value
2220
+ * @return {number}
2221
+ */
2222
+ Atomics.exchange = function(typedArray, index, value) {};
2223
+
2224
+ /**
2225
+ * @param {number} size
2226
+ * @return {boolean}
2227
+ */
2228
+ Atomics.isLockFree = function(size) {};
2229
+
2230
+ /**
2231
+ * @param {!TypedArray} typedArray
2232
+ * @param {number} index
2233
+ * @return {number}
2234
+ */
2235
+ Atomics.load = function(typedArray, index) {};
2236
+
2237
+ /**
2238
+ * @param {!Int32Array|!BigInt64Array} typedArray
2239
+ * @param {number} index
2240
+ * @param {number=} count
2241
+ * @return {number}
2242
+ */
2243
+ Atomics.notify = function(typedArray, index, count) {};
2244
+
2245
+ /**
2246
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2247
+ * typedArray
2248
+ * @param {number} index
2249
+ * @param {number} value
2250
+ * @return {number}
2251
+ */
2252
+ Atomics.or = function(typedArray, index, value) {};
2253
+
2254
+ /**
2255
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2256
+ * typedArray
2257
+ * @param {number} index
2258
+ * @param {number} value
2259
+ * @return {number}
2260
+ */
2261
+ Atomics.store = function(typedArray, index, value) {};
2262
+
2263
+ /**
2264
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2265
+ * typedArray
2266
+ * @param {number} index
2267
+ * @param {number} value
2268
+ * @return {number}
2269
+ */
2270
+ Atomics.sub = function(typedArray, index, value) {};
2271
+
2272
+ /**
2273
+ * @param {!Int32Array|!BigInt64Array} typedArray
2274
+ * @param {number} index
2275
+ * @param {number} value
2276
+ * @param {number=} timeout
2277
+ * @return {string}
2278
+ */
2279
+ Atomics.wait = function(typedArray, index, value, timeout) {};
2280
+
2281
+ /**
2282
+ * @param {!Int32Array} typedArray
2283
+ * @param {number} index
2284
+ * @param {number=} count
2285
+ * @return {number}
2286
+ */
2287
+ Atomics.wake = function(typedArray, index, count) {};
2288
+
2289
+ /**
2290
+ * @param {!Int8Array|!Uint8Array|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
2291
+ * typedArray
2292
+ * @param {number} index
2293
+ * @param {number} value
2294
+ * @return {number}
2295
+ */
2296
+ Atomics.xor = function(typedArray, index, value) {};
2297
+
2298
+
2299
+ /**
2300
+ * TODO(b/142881197): TReturn and TNext are not yet used for anything.
2301
+ * https://github.com/google/closure-compiler/issues/3489
2302
+ * @interface
2303
+ * @template T, TReturn, TNext
2304
+ * @see https://tc39.github.io/proposal-async-iteration/
2305
+ */
2306
+ function AsyncIterator() {}
2307
+
2308
+ /**
2309
+ * @param {?=} opt_value
2310
+ * @return {!Promise<!IIterableResult<T>>}
2311
+ */
2312
+ AsyncIterator.prototype.next;
2313
+
2314
+
2315
+ /**
2316
+ * @interface
2317
+ * @template T, TReturn, TNext
2318
+ */
2319
+ function AsyncIterable() {}
2320
+
2321
+
2322
+ /**
2323
+ * @return {!AsyncIterator<T, ?, *>}
2324
+ */
2325
+ AsyncIterable.prototype[Symbol.asyncIterator] = function() {};
2326
+
2327
+
2328
+ /**
2329
+ * @interface
2330
+ * @extends {AsyncIterator<T, ?, *>}
2331
+ * @extends {AsyncIterable<T>}
2332
+ * @template T
2333
+ * @see https://tc39.github.io/proposal-async-iteration/
2334
+ */
2335
+ function AsyncIteratorIterable() {}
2336
+
2337
+ /**
2338
+ * TODO(b/142881197): TReturn and TNext are not yet used for anything.
2339
+ * https://github.com/google/closure-compiler/issues/3489
2340
+ * @interface
2341
+ * @see https://tc39.github.io/proposal-async-iteration/
2342
+ * @extends {AsyncIteratorIterable<T, TReturn, TNext>}
2343
+ * @template T, TReturn, TNext
2344
+ */
2345
+ function AsyncGenerator() {}
2346
+
2347
+ /**
2348
+ * @param {?=} opt_value
2349
+ * @return {!Promise<!IIterableResult<T>>}
2350
+ * @override
2351
+ */
2352
+ AsyncGenerator.prototype.next = function(opt_value) {};
2353
+
2354
+ /**
2355
+ * @param {T} value
2356
+ * @return {!Promise<!IIterableResult<T>>}
2357
+ */
2358
+ AsyncGenerator.prototype.return = function(value) {};
2359
+
2360
+ /**
2361
+ * @param {?} exception
2362
+ * @return {!Promise<!IIterableResult<T>>}
2363
+ */
2364
+ AsyncGenerator.prototype.throw = function(exception) {};
2365
+
2366
+ /**
2367
+ * @constructor
2368
+ * @struct
2369
+ * @param {TYPE} value
2370
+ * @template TYPE
2371
+ * @nosideeffects
2372
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef
2373
+ */
2374
+ function WeakRef(value) {}
2375
+
2376
+ /**
2377
+ * @return {TYPE}
2378
+ * @nosideeffects
2379
+ */
2380
+ WeakRef.prototype.deref = function() {};
2381
+
2382
+ /**
2383
+ * @constructor
2384
+ * @struct
2385
+ * @param {function(HELDVALUE)} cleanupCallback
2386
+ * @template TARGET, HELDVALUE, TOKEN
2387
+ * @nosideeffects
2388
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry
2389
+ */
2390
+ function FinalizationRegistry(cleanupCallback) {}
2391
+
2392
+ /**
2393
+ * @param {TARGET} target
2394
+ * @param {HELDVALUE} heldValue
2395
+ * @param {TOKEN=} unregisterToken
2396
+ * @return {void}
2397
+ */
2398
+ FinalizationRegistry.prototype.register = function(
2399
+ target, heldValue, unregisterToken) {};
2400
+
2401
+ /**
2402
+ * @param {TOKEN} unregisterToken
2403
+ * @return {void}
2404
+ */
2405
+ FinalizationRegistry.prototype.unregister = function(unregisterToken) {};
2406
+
2407
+ /**
2408
+ * @type {!Global}
2409
+ */
2410
+ var globalThis;
2411
+
2412
+ /**
2413
+ * @const {symbol}
2414
+ */
2415
+ Symbol.dispose;
2416
+
2417
+ /**
2418
+ * @const {symbol}
2419
+ */
2420
+ Symbol.asyncDispose;
2421
+
2422
+ /**
2423
+ * Wraps an error that suppresses another error, and the error that was
2424
+ * suppressed.
2425
+ *
2426
+ * @constructor
2427
+ * @extends {Error}
2428
+ * @param {?} error The error that resulted in a suppression.
2429
+ * @param {?} suppressed The error that was suppressed.
2430
+ * @param {string=} message The message for the error.
2431
+ * @return {!SuppressedError}
2432
+ * @nosideeffects
2433
+ */
2434
+ function SuppressedError(error, suppressed, message) {}
2435
+
2436
+ /**
2437
+ * The error that resulted in a suppression.
2438
+ * @type {?}
2439
+ */
2440
+ SuppressedError.prototype.error;
2441
+
2442
+ /**
2443
+ * The error that was suppressed.
2444
+ * @type {?}
2445
+ */
2446
+ SuppressedError.prototype.suppressed;
2447
+
2448
+
2449
+ /**
2450
+ * @record
2451
+ */
2452
+ function Disposable() {}
2453
+
2454
+ /**
2455
+ * @return {void}
2456
+ */
2457
+ Disposable.prototype[Symbol.dispose] = function() {};
2458
+
2459
+ /**
2460
+ * A DisposableStack is an object that can be used to contain one or more
2461
+ * resources that should be disposed together.
2462
+ *
2463
+ * @constructor
2464
+ */
2465
+ function DisposableStack() {}
2466
+
2467
+ /**
2468
+ * @type {boolean}
2469
+ */
2470
+ DisposableStack.prototype.disposed;
2471
+
2472
+ /**
2473
+ * @return {void}
2474
+ */
2475
+ DisposableStack.prototype.dispose = function() {};
2476
+ /**
2477
+ * @return {void}
2478
+ */
2479
+ DisposableStack.prototype[Symbol.dispose] = function () {};
2480
+ /**
2481
+ * @param {!Disposable|null|undefined} disposable
2482
+ * @return {!Disposable|null|undefined}
2483
+ */
2484
+ DisposableStack.prototype.use = function(disposable) {};
2485
+ /**
2486
+ * @template T
2487
+ * @param {T} value
2488
+ * @param {function(T)} onDispose
2489
+ * @return {T}
2490
+ */
2491
+ DisposableStack.prototype.adopt = function(value, onDispose) {};
2492
+ /**
2493
+ * @param {function(): void} onDispose
2494
+ * @return {void}
2495
+ */
2496
+ DisposableStack.prototype.defer = function(onDispose) {};
2497
+ /**
2498
+ * @return {!DisposableStack}
2499
+ */
2500
+ DisposableStack.prototype.move = function() {};
2501
+
2502
+ /**
2503
+ * @record
2504
+ */
2505
+ function AsyncDisposable() {}
2506
+
2507
+ /**
2508
+ * @return {void}
2509
+ */
2510
+ AsyncDisposable.prototype[Symbol.asyncDispose] = function() {};
2511
+
2512
+ /**
2513
+ * An AsyncDisposableStack is an object that can be used to contain one or more
2514
+ * resources that should be disposed of together. The resources may be disposed
2515
+ * of asynchronously.
2516
+ *
2517
+ * @constructor
2518
+ */
2519
+ function AsyncDisposableStack() {}
2520
+
2521
+ /**
2522
+ * @type {boolean}
2523
+ */
2524
+ AsyncDisposableStack.prototype.disposed;
2525
+
2526
+ /**
2527
+ * @return {!Promise<void>}
2528
+ */
2529
+ AsyncDisposableStack.prototype.disposeAsync = function() {};
2530
+ /**
2531
+ * @return {!Promise<void>}
2532
+ */
2533
+ AsyncDisposableStack.prototype[Symbol.asyncDispose] = function () {};
2534
+ /**
2535
+ * @param {!AsyncDisposable|!Disposable|null|undefined} disposable
2536
+ * @return {!AsyncDisposable|!Disposable|null|undefined}
2537
+ */
2538
+ AsyncDisposableStack.prototype.use = function(disposable) {};
2539
+ /**
2540
+ * @template T
2541
+ * @param {T} value
2542
+ * @param {function(T): (void|!Promise<void>)} onDispose
2543
+ * @return {T}
2544
+ */
2545
+ AsyncDisposableStack.prototype.adopt = function(value, onDispose) {};
2546
+ /**
2547
+ * @param {function(): (void|!Promise<void>)} onDispose
2548
+ * @return {void}
2549
+ */
2550
+ AsyncDisposableStack.prototype.defer = function(onDispose) {};
2551
+ /**
2552
+ * @return {!AsyncDisposableStack}
2553
+ */
2554
+ AsyncDisposableStack.prototype.move = function() {};