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
@@ -0,0 +1,437 @@
1
+ /*
2
+ * Copyright 2011 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 W3C's Navigation Timing specification.
19
+ *
20
+ * Created from
21
+ * @see http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
22
+ * @see http://w3c-test.org/webperf/specs/ResourceTiming
23
+ * @see http://www.w3.org/TR/performance-timeline
24
+ * @see http://www.w3.org/TR/user-timing/
25
+ * @see https://w3c.github.io/server-timing/
26
+ *
27
+ * @externs
28
+ */
29
+
30
+ /** @constructor */
31
+ function PerformanceTiming() {}
32
+ /** @type {number} */ PerformanceTiming.prototype.navigationStart;
33
+ /** @type {number} */ PerformanceTiming.prototype.unloadEventStart;
34
+ /** @type {number} */ PerformanceTiming.prototype.unloadEventEnd;
35
+ /** @type {number} */ PerformanceTiming.prototype.redirectStart;
36
+ /** @type {number} */ PerformanceTiming.prototype.redirectEnd;
37
+ /** @type {number} */ PerformanceTiming.prototype.fetchStart;
38
+ /** @type {number} */ PerformanceTiming.prototype.domainLookupStart;
39
+ /** @type {number} */ PerformanceTiming.prototype.domainLookupEnd;
40
+ /** @type {number} */ PerformanceTiming.prototype.connectStart;
41
+ /** @type {number} */ PerformanceTiming.prototype.connectEnd;
42
+ /** @type {number} */ PerformanceTiming.prototype.secureConnectionStart;
43
+ /** @type {number} */ PerformanceTiming.prototype.requestStart;
44
+ /** @type {number} */ PerformanceTiming.prototype.responseStart;
45
+ /** @type {number} */ PerformanceTiming.prototype.responseEnd;
46
+ /** @type {number} */ PerformanceTiming.prototype.domLoading;
47
+ /** @type {number} */ PerformanceTiming.prototype.domInteractive;
48
+ /** @type {number} */ PerformanceTiming.prototype.domContentLoadedEventStart;
49
+ /** @type {number} */ PerformanceTiming.prototype.domContentLoadedEventEnd;
50
+ /** @type {number} */ PerformanceTiming.prototype.domComplete;
51
+ /** @type {number} */ PerformanceTiming.prototype.loadEventStart;
52
+ /** @type {number} */ PerformanceTiming.prototype.loadEventEnd;
53
+
54
+ /** @constructor */
55
+ function PerformanceEntry() {}
56
+ /** @type {string} */ PerformanceEntry.prototype.name;
57
+ /** @type {string} */ PerformanceEntry.prototype.entryType;
58
+ /** @type {number} */ PerformanceEntry.prototype.startTime;
59
+ /** @type {number} */ PerformanceEntry.prototype.duration;
60
+
61
+ /**
62
+ * https://www.w3.org/TR/resource-timing-2/#performanceresourcetiming
63
+ * @constructor
64
+ * @extends {PerformanceEntry}
65
+ */
66
+ function PerformanceResourceTiming() {}
67
+ /** @type {number} */ PerformanceResourceTiming.prototype.redirectStart;
68
+ /** @type {number} */ PerformanceResourceTiming.prototype.redirectEnd;
69
+ /** @type {number} */ PerformanceResourceTiming.prototype.fetchStart;
70
+ /** @type {number} */ PerformanceResourceTiming.prototype.domainLookupStart;
71
+ /** @type {number} */ PerformanceResourceTiming.prototype.domainLookupEnd;
72
+ /** @type {number} */ PerformanceResourceTiming.prototype.connectStart;
73
+ /** @type {number} */ PerformanceResourceTiming.prototype.connectEnd;
74
+ /** @type {number} */
75
+ PerformanceResourceTiming.prototype.secureConnectionStart;
76
+ /** @type {number} */ PerformanceResourceTiming.prototype.responseStatus;
77
+ /** @type {number} */ PerformanceResourceTiming.prototype.requestStart;
78
+ /** @type {number} */ PerformanceResourceTiming.prototype.responseStart;
79
+ /** @type {number} */ PerformanceResourceTiming.prototype.responseEnd;
80
+ /** @type {string} */ PerformanceResourceTiming.prototype.initiatorType;
81
+ /** @type {number|undefined} */
82
+ PerformanceResourceTiming.prototype.transferSize;
83
+ /** @type {number|undefined} */
84
+ PerformanceResourceTiming.prototype.encodedBodySize;
85
+ /** @type {number|undefined} */
86
+ PerformanceResourceTiming.prototype.decodedBodySize;
87
+ /** @type {number|undefined} */
88
+ PerformanceResourceTiming.prototype.workerStart;
89
+ /** @type {string} */ PerformanceResourceTiming.prototype.nextHopProtocol;
90
+ /** @type {!Array<!PerformanceServerTiming>} */ PerformanceResourceTiming.prototype.serverTiming;
91
+
92
+ /**
93
+ * https://w3c.github.io/server-timing/#dom-performanceservertiming
94
+ * @constructor
95
+ */
96
+ function PerformanceServerTiming() {}
97
+ /** @type {string} */ PerformanceServerTiming.prototype.name;
98
+ /** @type {number} */ PerformanceServerTiming.prototype.duration;
99
+ /** @type {string} */ PerformanceServerTiming.prototype.description;
100
+
101
+ /**
102
+ * Possible values are 'navigate', 'reload', 'back_forward', and 'prerender'.
103
+ * See https://w3c.github.io/navigation-timing/#sec-performance-navigation-types
104
+ * @typedef {string}
105
+ */
106
+ var NavigationType;
107
+
108
+ /**
109
+ * https://w3c.github.io/navigation-timing/#sec-PerformanceNavigationTiming
110
+ * @constructor
111
+ * @extends {PerformanceResourceTiming}
112
+ */
113
+ function PerformanceNavigationTiming() {}
114
+ /** @type {number} */ PerformanceNavigationTiming.prototype.unloadEventStart;
115
+ /** @type {number} */ PerformanceNavigationTiming.prototype.unloadEventEnd;
116
+ /** @type {number} */ PerformanceNavigationTiming.prototype.domInteractive;
117
+ /** @type {number} */ PerformanceNavigationTiming.prototype
118
+ .domContentLoadedEventStart;
119
+ /** @type {number} */ PerformanceNavigationTiming.prototype
120
+ .domContentLoadedEventEnd;
121
+ /** @type {number} */ PerformanceNavigationTiming.prototype.domComplete;
122
+ /** @type {number} */ PerformanceNavigationTiming.prototype.loadEventStart;
123
+ /** @type {number} */ PerformanceNavigationTiming.prototype.loadEventEnd;
124
+ /** @type {NavigationType} */ PerformanceNavigationTiming.prototype.type;
125
+ /** @type {number} */ PerformanceNavigationTiming.prototype.redirectCount;
126
+ // https://wicg.github.io/nav-speculation/prerendering.html#performance-navigation-timing-extension
127
+ /** @type {number} */ PerformanceNavigationTiming.prototype.activationStart;
128
+
129
+ /**
130
+ * https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
131
+ * @constructor
132
+ * @extends {PerformanceEntry}
133
+ */
134
+ function PerformancePaintTiming() {}
135
+
136
+ /** @constructor */
137
+ function PerformanceNavigation() {}
138
+ /** @const {number} */ PerformanceNavigation.TYPE_NAVIGATE;
139
+ /** @const {number} */ PerformanceNavigation.prototype.TYPE_NAVIGATE;
140
+ /** @const {number} */ PerformanceNavigation.TYPE_RELOAD;
141
+ /** @const {number} */ PerformanceNavigation.prototype.TYPE_RELOAD;
142
+ /** @const {number} */ PerformanceNavigation.TYPE_BACK_FORWARD;
143
+ /** @const {number} */ PerformanceNavigation.prototype.TYPE_BACK_FORWARD;
144
+ /** @const {number} */ PerformanceNavigation.TYPE_RESERVED;
145
+ /** @const {number} */ PerformanceNavigation.prototype.TYPE_RESERVED;
146
+ /** @type {number} */ PerformanceNavigation.prototype.type;
147
+ /** @type {number} */ PerformanceNavigation.prototype.redirectCount;
148
+
149
+ /**
150
+ * https://w3c.github.io/longtasks/#taskattributiontiming
151
+ * @constructor
152
+ * @extends {PerformanceEntry}
153
+ */
154
+ function TaskAttributionTiming() {}
155
+ /** @type {string} */ TaskAttributionTiming.prototype.containerId;
156
+ /** @type {string} */ TaskAttributionTiming.prototype.containerName;
157
+ /** @type {string} */ TaskAttributionTiming.prototype.containerSrc;
158
+ /** @type {string} */ TaskAttributionTiming.prototype.containerType;
159
+
160
+ /**
161
+ * https://w3c.github.io/longtasks/#performancelongtasktiming
162
+ * @constructor
163
+ * @extends {PerformanceEntry}
164
+ */
165
+ function PerformanceLongTaskTiming() {}
166
+ /** @type {!Array<!TaskAttributionTiming>} */
167
+ PerformanceLongTaskTiming.prototype.attribution;
168
+
169
+ /**
170
+ * https://wicg.github.io/layout-instability/#sec-layout-shift
171
+ * @constructor
172
+ * @extends {PerformanceEntry}
173
+ */
174
+ function LayoutShift() {}
175
+ /** @type {number} */ LayoutShift.prototype.value;
176
+ /** @type {boolean} */ LayoutShift.prototype.hadRecentInput;
177
+ /** @type {number} */ LayoutShift.prototype.lastInputTime;
178
+ /** @type {!Array<!LayoutShiftAttribution>} */ LayoutShift.prototype.sources;
179
+
180
+ /**
181
+ * https://wicg.github.io/layout-instability/#sec-layout-shift
182
+ * @constructor
183
+ */
184
+ function LayoutShiftAttribution() {}
185
+ /** @type {?Node} */ LayoutShiftAttribution.prototype.node;
186
+ /** @type {!DOMRectReadOnly} */ LayoutShiftAttribution.prototype.previousRect;
187
+ /** @type {!DOMRectReadOnly} */ LayoutShiftAttribution.prototype.currentRect;
188
+
189
+ /**
190
+ * https://wicg.github.io/largest-contentful-paint/#largestcontentfulpaint
191
+ * @constructor
192
+ * @extends {PerformanceEntry}
193
+ */
194
+ function LargestContentfulPaint() {}
195
+ /** @type {number} */ LargestContentfulPaint.prototype.renderTime;
196
+ /** @type {number} */ LargestContentfulPaint.prototype.loadTime;
197
+ /** @type {number} */ LargestContentfulPaint.prototype.size;
198
+ /** @type {string} */ LargestContentfulPaint.prototype.id;
199
+ /** @type {string} */ LargestContentfulPaint.prototype.url;
200
+ /** @type {?Element} */ LargestContentfulPaint.prototype.element;
201
+
202
+ /**
203
+ * https://wicg.github.io/event-timing/#sec-performance-event-timing
204
+ * @constructor
205
+ * @extends {PerformanceEntry}
206
+ */
207
+ function PerformanceEventTiming() {}
208
+ /** @type {number} */ PerformanceEventTiming.prototype.processingStart;
209
+ /** @type {number} */ PerformanceEventTiming.prototype.processingEnd;
210
+ /** @type {boolean} */ PerformanceEventTiming.prototype.cancelable;
211
+ /** @type {?Node} */ PerformanceEventTiming.prototype.target;
212
+
213
+ /**
214
+ * @record
215
+ * @see https://www.w3.org/TR/user-timing-3/#performancemarkoptions-dictionary
216
+ */
217
+ function PerformanceMarkOptions() {}
218
+ /** @type {Object|undefined} */ PerformanceMarkOptions.prototype.detail;
219
+ /** @type {number|undefined} */ PerformanceMarkOptions.prototype.startTime;
220
+
221
+ /**
222
+ * @record
223
+ * @see https://www.w3.org/TR/user-timing-3/#performancemeasureoptions-dictionary
224
+ */
225
+ function PerformanceMeasureOptions() {}
226
+ /** @type {Object|undefined} */ PerformanceMeasureOptions.prototype.detail;
227
+ /** @type {string|number|undefined} */ PerformanceMeasureOptions.prototype
228
+ .start;
229
+ /** @type {number|undefined} */ PerformanceMeasureOptions.prototype.duration;
230
+ /** @type {string|number|undefined} */ PerformanceMeasureOptions.prototype.end;
231
+
232
+ /**
233
+ * @see https://developer.mozilla.org/docs/Web/API/EventCounts
234
+ * @constructor
235
+ */
236
+ function EventCounts() {}
237
+
238
+ /**
239
+ * @param {function(number, string, !EventCounts): void} callback
240
+ * @param {*} thisArg
241
+ * @return {void}
242
+ */
243
+ EventCounts.prototype.forEach = function(callback, thisArg) {}
244
+
245
+ /** @constructor */
246
+ function Performance() {}
247
+
248
+ /** @const {!EventCounts} */
249
+ Performance.prototype.eventCounts;
250
+
251
+ /** @type {PerformanceTiming} */
252
+ Performance.prototype.timing;
253
+
254
+ /** @type {PerformanceNavigation} */
255
+ Performance.prototype.navigation;
256
+
257
+ /** @type {number} */
258
+ Performance.prototype.timeOrigin;
259
+
260
+
261
+ /**
262
+ * Clears the buffer used to store the current list of
263
+ * PerformanceResourceTiming resources.
264
+ * @return {undefined}
265
+ */
266
+ Performance.prototype.clearResourceTimings = function() {};
267
+
268
+ /**
269
+ * A callback that is invoked when the resourcetimingbufferfull event is fired.
270
+ * @type {?function(Event)}
271
+ */
272
+ Performance.prototype.onresourcetimingbufferfull = function() {};
273
+
274
+ /**
275
+ * Set the maximum number of PerformanceResourceTiming resources that may be
276
+ * stored in the buffer.
277
+ * @param {number} maxSize
278
+ * @return {undefined}
279
+ */
280
+ Performance.prototype.setResourceTimingBufferSize = function(maxSize) {};
281
+
282
+ /**
283
+ * @return {!Array<!PerformanceEntry>} A copy of the PerformanceEntry list,
284
+ * in chronological order with respect to startTime.
285
+ * @nosideeffects
286
+ */
287
+ Performance.prototype.getEntries = function() {};
288
+
289
+ /**
290
+ * @param {string} entryType Only return `PerformanceEntry`s with this
291
+ * entryType.
292
+ * @return {!Array<!PerformanceEntry>} A copy of the PerformanceEntry list,
293
+ * in chronological order with respect to startTime.
294
+ * @nosideeffects
295
+ */
296
+ Performance.prototype.getEntriesByType = function(entryType) {};
297
+
298
+ /**
299
+ * @param {string} name Only return `PerformanceEntry`s with this name.
300
+ * @param {string=} opt_entryType Only return `PerformanceEntry`s with
301
+ * this entryType.
302
+ * @return {!Array<!PerformanceEntry>} PerformanceEntry list in chronological
303
+ * order with respect to startTime.
304
+ * @nosideeffects
305
+ */
306
+ Performance.prototype.getEntriesByName = function(name, opt_entryType) {};
307
+
308
+ /**
309
+ * @return {number}
310
+ * @nosideeffects
311
+ */
312
+ Performance.prototype.now = function() {};
313
+
314
+ /**
315
+ * @param {string} markName
316
+ * @param {PerformanceMarkOptions=} markOptions
317
+ * @return {PerformanceMark|undefined}
318
+ */
319
+ Performance.prototype.mark = function(markName, markOptions) {};
320
+
321
+ /**
322
+ * @param {string=} opt_markName
323
+ * @return {undefined}
324
+ */
325
+ Performance.prototype.clearMarks = function(opt_markName) {};
326
+
327
+ /**
328
+ * @param {string} measureName
329
+ * @param {string|PerformanceMeasureOptions=} startOrMeasureOptions
330
+ * @param {string=} endMark
331
+ * @return {PerformanceMeasure|undefined}
332
+ */
333
+ Performance.prototype.measure = function(
334
+ measureName, startOrMeasureOptions, endMark) {};
335
+
336
+ /**
337
+ * @param {string=} opt_measureName
338
+ * @return {undefined}
339
+ */
340
+ Performance.prototype.clearMeasures = function(opt_measureName) {};
341
+
342
+ /** @type {Performance} */
343
+ Window.prototype.performance;
344
+
345
+ /**
346
+ * @type {!Performance}
347
+ * @suppress {duplicate}
348
+ */
349
+ var performance;
350
+
351
+ /**
352
+ * @constructor
353
+ * @extends {PerformanceEntry}
354
+ * @param {string} markName
355
+ * @param {PerformanceMarkOptions=} markOptions
356
+ * @see https://www.w3.org/TR/user-timing-3/#performancemark
357
+ */
358
+ function PerformanceMark(markName, markOptions) {}
359
+ /** @type {Object} (readonly) */ PerformanceMark.prototype.detail;
360
+
361
+ /**
362
+ * @constructor
363
+ * @extends {PerformanceEntry}
364
+ * @see https://www.w3.org/TR/user-timing-3/#performancemeasure
365
+ */
366
+ function PerformanceMeasure() {}
367
+ /** @type {Object} (readonly) */ PerformanceMeasure.prototype.detail;
368
+
369
+ /**
370
+ * @constructor
371
+ * @extends {Performance}
372
+ */
373
+ function WorkerPerformance() {}
374
+
375
+ /**
376
+ * @typedef {function(!PerformanceObserverEntryList, !PerformanceObserver): void}
377
+ */
378
+ var PerformanceObserverCallback;
379
+
380
+ /**
381
+ * See:
382
+ * https://w3c.github.io/performance-timeline/#the-performanceobserver-interface
383
+ * @constructor
384
+ * @param {!PerformanceObserverCallback} callback
385
+ */
386
+ function PerformanceObserver(callback) {}
387
+
388
+ /**
389
+ * @param {!PerformanceObserverInit} options
390
+ */
391
+ PerformanceObserver.prototype.observe = function(options) {};
392
+
393
+ /** @return {void} */
394
+ PerformanceObserver.prototype.disconnect = function() {};
395
+
396
+ /**
397
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/takeRecords
398
+ * @see https://www.w3.org/TR/performance-timeline-2/#takerecords-method
399
+ * @return {!Array<!PerformanceEntry>} The current PerformanceEntry list stored
400
+ * in the performance observer buffer, emptying it out.
401
+ */
402
+ PerformanceObserver.prototype.takeRecords = function() {};
403
+
404
+ /** @const {!Array<string>} */
405
+ PerformanceObserver.supportedEntryTypes;
406
+
407
+ /**
408
+ * @record
409
+ */
410
+ function PerformanceObserverInit() {}
411
+
412
+ /** @type {undefined|!Array<string>} */
413
+ PerformanceObserverInit.prototype.entryTypes;
414
+ /** @type {undefined|string} */
415
+ PerformanceObserverInit.prototype.type;
416
+ /** @type {undefined|boolean} */
417
+ PerformanceObserverInit.prototype.buffered;
418
+
419
+ /**
420
+ * @constructor
421
+ */
422
+ function PerformanceObserverEntryList() {}
423
+
424
+ /** @return {!Array<!PerformanceEntry>} */
425
+ PerformanceObserverEntryList.prototype.getEntries = function() {};
426
+ /**
427
+ * @param {string} type
428
+ * @return {!Array<!PerformanceEntry>}
429
+ */
430
+ PerformanceObserverEntryList.prototype.getEntriesByName = function(type) {};
431
+ /**
432
+ * @param {string} name
433
+ * @param {string=} opt_type
434
+ * @return {!Array<!PerformanceEntry>}
435
+ */
436
+ PerformanceObserverEntryList.prototype.getEntriesByType = function(
437
+ name, opt_type) {};
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Copyright 2017 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 Externs for the Network Information API.
19
+ * @externs
20
+ */
21
+
22
+ /**
23
+ * @see http://wicg.github.io/netinfo/#-dfn-networkinformation-dfn-interface
24
+ * @constructor
25
+ */
26
+ function NetworkInformation() {}
27
+
28
+ /** @type {ConnectionType} */
29
+ NetworkInformation.prototype.type;
30
+
31
+ /** @type {EffectiveConnectionType} */
32
+ NetworkInformation.prototype.effectiveType;
33
+
34
+ /** @type {Megabit} */
35
+ NetworkInformation.prototype.downlinkMax;
36
+
37
+ /** @type {Megabit} */
38
+ NetworkInformation.prototype.downlink;
39
+
40
+ /** @type {Millisecond} */
41
+ NetworkInformation.prototype.rtt;
42
+
43
+ /** @type {?function(Event)} */
44
+ NetworkInformation.prototype.onchange;
45
+
46
+ /** @type {boolean} */
47
+ NetworkInformation.prototype.saveData;
48
+
49
+ /**
50
+ * @typedef {number}
51
+ */
52
+ var Megabit;
53
+
54
+ /**
55
+ * @typedef {number}
56
+ */
57
+ var Millisecond;
58
+
59
+ /**
60
+ * Enum of:
61
+ * 'bluetooth',
62
+ * 'cellular',
63
+ * 'ethernet',
64
+ * 'mixed',
65
+ * 'none',
66
+ * 'other',
67
+ * 'unknown',
68
+ * 'wifi',
69
+ * 'wimax'
70
+ * @typedef {string}
71
+ */
72
+ var ConnectionType;
73
+
74
+ /**
75
+ * Enum of:
76
+ * '2g',
77
+ * '3g',
78
+ * '4g',
79
+ * 'slow-2g'
80
+ * @typedef {string}
81
+ */
82
+ var EffectiveConnectionType;
83
+
84
+ /** @type {!NetworkInformation} */
85
+ Navigator.prototype.connection;