google-closure-compiler 20250412.0.0-nightly → 20250413.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -30
- package/cli.js +3 -4
- package/externs/browser/decorators.js +276 -0
- package/externs/browser/deprecated.js +58 -0
- package/externs/browser/es6_proxy.js +143 -0
- package/externs/browser/fetchapi.js +449 -0
- package/externs/browser/fido.js +94 -0
- package/externs/browser/flash.js +226 -0
- package/externs/browser/gecko_css.js +126 -0
- package/externs/browser/gecko_dom.js +479 -0
- package/externs/browser/gecko_event.js +86 -0
- package/externs/browser/gecko_xml.js +73 -0
- package/externs/browser/google_legacy.js +31 -0
- package/externs/browser/html5.js +6647 -0
- package/externs/browser/ie_css.js +270 -0
- package/externs/browser/ie_dom.js +1232 -0
- package/externs/browser/ie_event.js +310 -0
- package/externs/browser/ie_vml.js +77 -0
- package/externs/browser/intersection_observer.js +178 -0
- package/externs/browser/intl.js +602 -0
- package/externs/browser/iphone.js +204 -0
- package/externs/browser/mediakeys.js +305 -0
- package/externs/browser/mediasource.js +155 -0
- package/externs/browser/nonstandard_anim_timing.js +97 -0
- package/externs/browser/nonstandard_audio.js +82 -0
- package/externs/browser/nonstandard_console.js +75 -0
- package/externs/browser/nonstandard_fileapi.js +1066 -0
- package/externs/browser/nonstandard_indexeddb.js +78 -0
- package/externs/browser/nonstandard_navigation_timing.js +38 -0
- package/externs/browser/nonstandard_selection.js +80 -0
- package/externs/browser/page_visibility.js +28 -0
- package/externs/browser/streamsapi.js +593 -0
- package/externs/browser/svg.js +10016 -0
- package/externs/browser/url.js +202 -0
- package/externs/browser/v8.js +134 -0
- package/externs/browser/w3c_abort.js +89 -0
- package/externs/browser/w3c_anim_timing.js +49 -0
- package/externs/browser/w3c_aria_mixin.js +286 -0
- package/externs/browser/w3c_audio.js +1660 -0
- package/externs/browser/w3c_batterystatus.js +85 -0
- package/externs/browser/w3c_clipboard.js +74 -0
- package/externs/browser/w3c_clipboardevent.js +47 -0
- package/externs/browser/w3c_composition_event.js +93 -0
- package/externs/browser/w3c_css.js +3790 -0
- package/externs/browser/w3c_css3d.js +199 -0
- package/externs/browser/w3c_device_sensor_event.js +122 -0
- package/externs/browser/w3c_dom1.js +1160 -0
- package/externs/browser/w3c_dom2.js +3151 -0
- package/externs/browser/w3c_dom3.js +555 -0
- package/externs/browser/w3c_dom4.js +289 -0
- package/externs/browser/w3c_elementtraversal.js +116 -0
- package/externs/browser/w3c_event.js +607 -0
- package/externs/browser/w3c_event3.js +77 -0
- package/externs/browser/w3c_eventsource.js +110 -0
- package/externs/browser/w3c_fileapi.js +302 -0
- package/externs/browser/w3c_gamepad.js +113 -0
- package/externs/browser/w3c_geolocation.js +130 -0
- package/externs/browser/w3c_geometry1.js +899 -0
- package/externs/browser/w3c_indexeddb.js +771 -0
- package/externs/browser/w3c_keyboardlock.js +47 -0
- package/externs/browser/w3c_mediacapabilities.js +206 -0
- package/externs/browser/w3c_midi.js +301 -0
- package/externs/browser/w3c_navigation.js +72 -0
- package/externs/browser/w3c_navigation_timing.js +437 -0
- package/externs/browser/w3c_netinfo.js +85 -0
- package/externs/browser/w3c_payment_request.js +401 -0
- package/externs/browser/w3c_permissions.js +112 -0
- package/externs/browser/w3c_permissions_policy.js +78 -0
- package/externs/browser/w3c_pointer_events.js +163 -0
- package/externs/browser/w3c_pointerlock.js +63 -0
- package/externs/browser/w3c_range.js +284 -0
- package/externs/browser/w3c_referrer_policy.js +36 -0
- package/externs/browser/w3c_requestidlecallback.js +76 -0
- package/externs/browser/w3c_rtc.js +3882 -0
- package/externs/browser/w3c_screen_orientation.js +53 -0
- package/externs/browser/w3c_screen_wake_lock.js +58 -0
- package/externs/browser/w3c_selection.js +209 -0
- package/externs/browser/w3c_selectors.js +113 -0
- package/externs/browser/w3c_serviceworker.js +739 -0
- package/externs/browser/w3c_speech.js +426 -0
- package/externs/browser/w3c_touch_event.js +296 -0
- package/externs/browser/w3c_trusted_types.js +142 -0
- package/externs/browser/w3c_vibration.js +38 -0
- package/externs/browser/w3c_webcodecs.js +1473 -0
- package/externs/browser/w3c_webcrypto.js +839 -0
- package/externs/browser/w3c_worklets.js +54 -0
- package/externs/browser/w3c_xml.js +533 -0
- package/externs/browser/web_animations.js +452 -0
- package/externs/browser/web_app_manifest.js +50 -0
- package/externs/browser/webassembly.js +223 -0
- package/externs/browser/webgl.js +3409 -0
- package/externs/browser/webgl2.js +2727 -0
- package/externs/browser/webgl2_compute.js +1609 -0
- package/externs/browser/webkit_css.js +456 -0
- package/externs/browser/webkit_dom.js +118 -0
- package/externs/browser/webkit_event.js +46 -0
- package/externs/browser/webkit_notifications.js +258 -0
- package/externs/browser/webkit_usercontent.js +55 -0
- package/externs/browser/weblocksapi.js +125 -0
- package/externs/browser/webstorage.js +171 -0
- package/externs/browser/whatwg_bitmap_context.js +37 -0
- package/externs/browser/whatwg_console.js +152 -0
- package/externs/browser/whatwg_encoding.js +99 -0
- package/externs/browser/whatwg_file_system.js +296 -0
- package/externs/browser/wicg_attribution_reporting.js +42 -0
- package/externs/browser/wicg_compression_stream.js +60 -0
- package/externs/browser/wicg_constructable_stylesheets.js +60 -0
- package/externs/browser/wicg_entries.js +169 -0
- package/externs/browser/wicg_file_handling.js +41 -0
- package/externs/browser/wicg_file_system_access.js +191 -0
- package/externs/browser/wicg_floc.js +41 -0
- package/externs/browser/wicg_ink.js +89 -0
- package/externs/browser/wicg_resizeobserver.js +100 -0
- package/externs/browser/wicg_scheduler.js +62 -0
- package/externs/browser/wicg_trust_token.js +89 -0
- package/externs/browser/wicg_uach.js +100 -0
- package/externs/browser/window.js +190 -0
- package/externs/es3.js +2716 -0
- package/externs/es5.js +284 -0
- package/externs/es6.js +2554 -0
- package/externs/es6_collections.js +323 -0
- package/index.js +13 -16
- package/lib/grunt/index.js +71 -92
- package/lib/grunt/vinyl-stream.js +12 -18
- package/lib/gulp/concat-to-json.js +30 -18
- package/lib/gulp/index.js +174 -181
- package/lib/gulp/json-to-vinyl.js +8 -8
- package/lib/node/{closure-compiler.js → index.js} +27 -51
- package/lib/utils.js +16 -14
- package/package.json +19 -16
- package/lib/logger.js +0 -89
|
@@ -0,0 +1,771 @@
|
|
|
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 IndexedDB API and IndexedDB API 2.0 with
|
|
19
|
+
* some opportunistic enhancements from IndexedDB API 3.0.
|
|
20
|
+
* @see http://www.w3.org/TR/2015/REC-IndexedDB-20150108/
|
|
21
|
+
* @see https://www.w3.org/TR/2017/WD-IndexedDB-2-20170313/
|
|
22
|
+
* @see https://www.w3.org/TR/2021/WD-IndexedDB-3-20210618/
|
|
23
|
+
*
|
|
24
|
+
* @externs
|
|
25
|
+
* @author guido.tapia@picnet.com.au (Guido Tapia)
|
|
26
|
+
* @author vobruba.martin@gmail.com (Martin Vobruba)
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/** @type {!IDBFactory} */
|
|
30
|
+
var indexedDB;
|
|
31
|
+
|
|
32
|
+
/** @type {!IDBFactory|undefined} */
|
|
33
|
+
ServiceWorkerGlobalScope.prototype.indexedDB;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Possible values: 'readonly', 'readwrite', 'versionchange'
|
|
39
|
+
*
|
|
40
|
+
* @typedef {string}
|
|
41
|
+
* @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBTransactionMode
|
|
42
|
+
*/
|
|
43
|
+
var IDBTransactionMode;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Possible values: 'pending', 'done'
|
|
48
|
+
*
|
|
49
|
+
* @typedef {string}
|
|
50
|
+
* @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBRequestReadyState
|
|
51
|
+
*/
|
|
52
|
+
var IDBRequestReadyState;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Possible values: 'next', 'nextunique', 'prev', 'prevunique'
|
|
57
|
+
*
|
|
58
|
+
* @typedef {string}
|
|
59
|
+
* @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBCursorDirection
|
|
60
|
+
*/
|
|
61
|
+
var IDBCursorDirection;
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @record
|
|
66
|
+
* @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBIndexParameters
|
|
67
|
+
*/
|
|
68
|
+
function IDBIndexParameters(){};
|
|
69
|
+
|
|
70
|
+
/** @type {(undefined|boolean)} */
|
|
71
|
+
IDBIndexParameters.prototype.unique;
|
|
72
|
+
|
|
73
|
+
/** @type {(undefined|boolean)} */
|
|
74
|
+
IDBIndexParameters.prototype.multiEntry;
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @record
|
|
79
|
+
* @extends {EventInit}
|
|
80
|
+
* @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEventInit
|
|
81
|
+
*/
|
|
82
|
+
function IDBVersionChangeEventInit(){};
|
|
83
|
+
|
|
84
|
+
/** @type {(undefined|number)} */
|
|
85
|
+
IDBVersionChangeEventInit.prototype.oldVersion;
|
|
86
|
+
|
|
87
|
+
/** @type {(undefined|number|null)} */
|
|
88
|
+
IDBVersionChangeEventInit.prototype.newVersion;
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @record
|
|
94
|
+
* @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBObjectStoreParameters
|
|
95
|
+
*/
|
|
96
|
+
function IDBObjectStoreParameters() {};
|
|
97
|
+
|
|
98
|
+
/** @type {(undefined|string|!Array<string>|null)} */
|
|
99
|
+
IDBObjectStoreParameters.prototype.keyPath;
|
|
100
|
+
|
|
101
|
+
/** @type {(undefined|boolean)} */
|
|
102
|
+
IDBObjectStoreParameters.prototype.autoIncrement;
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @constructor
|
|
107
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBFactory
|
|
108
|
+
*/
|
|
109
|
+
function IDBFactory() {}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @param {string} name The name of the database to open.
|
|
113
|
+
* @param {number=} opt_version The version at which to open the database.
|
|
114
|
+
* @return {!IDBOpenDBRequest} The IDBRequest object.
|
|
115
|
+
*/
|
|
116
|
+
IDBFactory.prototype.open = function(name, opt_version) {};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @param {string} name The name of the database to delete.
|
|
120
|
+
* @return {!IDBOpenDBRequest} The IDBRequest object.
|
|
121
|
+
*/
|
|
122
|
+
IDBFactory.prototype.deleteDatabase = function(name) {};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @param {*} first
|
|
126
|
+
* @param {*} second
|
|
127
|
+
* @return {number}
|
|
128
|
+
*/
|
|
129
|
+
IDBFactory.prototype.cmp = function(first, second) {};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @return {!Promise<!Array<!IDBDatabaseInfo>>}
|
|
133
|
+
*/
|
|
134
|
+
IDBFactory.prototype.databases = function() {};
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @constructor
|
|
139
|
+
* @template T
|
|
140
|
+
* @implements {EventTarget}
|
|
141
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest
|
|
142
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#request-api
|
|
143
|
+
*/
|
|
144
|
+
function IDBRequest() {}
|
|
145
|
+
|
|
146
|
+
/** @override */
|
|
147
|
+
IDBRequest.prototype.addEventListener = function(type, listener, opt_options) {
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** @override */
|
|
151
|
+
IDBRequest.prototype.removeEventListener = function(
|
|
152
|
+
type, listener, opt_options) {};
|
|
153
|
+
|
|
154
|
+
/** @override */
|
|
155
|
+
IDBRequest.prototype.dispatchEvent = function(evt) {};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @type {!IDBRequestReadyState}
|
|
159
|
+
*/
|
|
160
|
+
IDBRequest.prototype.readyState; // readonly
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @type {function(!Event)}
|
|
164
|
+
*/
|
|
165
|
+
IDBRequest.prototype.onsuccess = function(e) {};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @type {function(!Event)}
|
|
169
|
+
*/
|
|
170
|
+
IDBRequest.prototype.onerror = function(e) {};
|
|
171
|
+
|
|
172
|
+
/** @type {T} */
|
|
173
|
+
IDBRequest.prototype.result; // readonly
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @type {number}
|
|
177
|
+
* @deprecated Use "error"
|
|
178
|
+
*/
|
|
179
|
+
IDBRequest.prototype.errorCode; // readonly
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
/** @type {?DOMError|?DOMException} */
|
|
183
|
+
IDBRequest.prototype.error; // readonly
|
|
184
|
+
|
|
185
|
+
/** @type {?IDBObjectStore|?IDBIndex|?IDBCursor} */
|
|
186
|
+
IDBRequest.prototype.source; // readonly
|
|
187
|
+
|
|
188
|
+
/** @type {?IDBTransaction} */
|
|
189
|
+
IDBRequest.prototype.transaction; // readonly
|
|
190
|
+
|
|
191
|
+
// Note: ?IDBDatabase is used as the type argument here in order to honor the
|
|
192
|
+
// fact that IDBFactory#deleteDatabase will always return with a null result.
|
|
193
|
+
// As of TS 5.7 the corresponding .d.ts declaration is incorrect as it does not
|
|
194
|
+
// allow for null.
|
|
195
|
+
/**
|
|
196
|
+
* @constructor
|
|
197
|
+
* @extends {IDBRequest<?IDBDatabase>}
|
|
198
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBOpenDBRequest
|
|
199
|
+
*/
|
|
200
|
+
function IDBOpenDBRequest() {}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @type {function(!IDBVersionChangeEvent)}
|
|
204
|
+
*/
|
|
205
|
+
IDBOpenDBRequest.prototype.onblocked = function(e) {};
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @type {function(!IDBVersionChangeEvent)}
|
|
209
|
+
*/
|
|
210
|
+
IDBOpenDBRequest.prototype.onupgradeneeded = function(e) {};
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @constructor
|
|
215
|
+
* @implements {EventTarget}
|
|
216
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBDatabase
|
|
217
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#database-interface
|
|
218
|
+
*/
|
|
219
|
+
function IDBDatabase() {}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @const {string}
|
|
223
|
+
*/
|
|
224
|
+
IDBDatabase.prototype.name;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @const {number}
|
|
228
|
+
*/
|
|
229
|
+
IDBDatabase.prototype.version;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @const {!DOMStringList}
|
|
233
|
+
*/
|
|
234
|
+
IDBDatabase.prototype.objectStoreNames;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @param {string} name The name of the object store.
|
|
238
|
+
* @param {!IDBObjectStoreParameters=} opt_parameters Parameters to be passed
|
|
239
|
+
* creating the object store.
|
|
240
|
+
* @return {!IDBObjectStore} The created/open object store.
|
|
241
|
+
*/
|
|
242
|
+
IDBDatabase.prototype.createObjectStore =
|
|
243
|
+
function(name, opt_parameters) {};
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @param {string} name The name of the object store to remove.
|
|
247
|
+
* @return {undefined}
|
|
248
|
+
*/
|
|
249
|
+
IDBDatabase.prototype.deleteObjectStore = function(name) {};
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Possible values: 'default', 'strict', 'relaxed'
|
|
253
|
+
*
|
|
254
|
+
* @typedef {string}
|
|
255
|
+
* @see https://www.w3.org/TR/IndexedDB-3/#enumdef-idbtransactiondurability
|
|
256
|
+
*/
|
|
257
|
+
var IDBTransactionDurability;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* See https://www.w3.org/TR/IndexedDB-3/#ref-for-dictdef-idbtransactionoptions
|
|
261
|
+
* @record
|
|
262
|
+
*/
|
|
263
|
+
var IDBTransactionOptions = function() {};
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @type {!IDBTransactionDurability}
|
|
267
|
+
* @see https://www.w3.org/TR/IndexedDB-3/#ref-for-dictdef-idbtransactionoptions
|
|
268
|
+
*/
|
|
269
|
+
IDBTransactionOptions.prototype.durability;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @param {(string|!Array<string>|!DOMStringList)} storeNames The stores to open
|
|
273
|
+
* in this transaction.
|
|
274
|
+
* @param {!IDBTransactionMode=} mode The mode for opening the object stores.
|
|
275
|
+
* @param {!IDBTransactionOptions=} options Extra options, like durability.
|
|
276
|
+
* @return {!IDBTransaction} The IDBRequest object.
|
|
277
|
+
*/
|
|
278
|
+
IDBDatabase.prototype.transaction = function(storeNames, mode, options) {};
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Closes the database connection.
|
|
282
|
+
* @return {undefined}
|
|
283
|
+
*/
|
|
284
|
+
IDBDatabase.prototype.close = function() {};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @type {?function(!Event)}
|
|
288
|
+
*/
|
|
289
|
+
IDBDatabase.prototype.onabort;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @type {?function(!Event)}
|
|
293
|
+
*/
|
|
294
|
+
IDBDatabase.prototype.onclose;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @type {?function(!Event)}
|
|
298
|
+
*/
|
|
299
|
+
IDBDatabase.prototype.onerror;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @type {?function(!IDBVersionChangeEvent)}
|
|
303
|
+
*/
|
|
304
|
+
IDBDatabase.prototype.onversionchange;
|
|
305
|
+
|
|
306
|
+
/** @override */
|
|
307
|
+
IDBDatabase.prototype.addEventListener = function(type, listener, opt_options) {
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/** @override */
|
|
311
|
+
IDBDatabase.prototype.removeEventListener = function(
|
|
312
|
+
type, listener, opt_options) {};
|
|
313
|
+
|
|
314
|
+
/** @override */
|
|
315
|
+
IDBDatabase.prototype.dispatchEvent = function(evt) {};
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Typedef for valid key types according to the w3 specification. Note that this
|
|
320
|
+
* is slightly wider than what is actually allowed, as all Array elements must
|
|
321
|
+
* have a valid key type.
|
|
322
|
+
* @see http://www.w3.org/TR/IndexedDB/#key-construct
|
|
323
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#key-construct
|
|
324
|
+
* @typedef {number|string|!Date|!Array<?>|!BufferSource}
|
|
325
|
+
*/
|
|
326
|
+
var IDBKeyType;
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @constructor
|
|
331
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBObjectStore
|
|
332
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#object-store-interface
|
|
333
|
+
*/
|
|
334
|
+
function IDBObjectStore() {}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @type {string}
|
|
338
|
+
*/
|
|
339
|
+
IDBObjectStore.prototype.name;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* @type {*}
|
|
343
|
+
*/
|
|
344
|
+
IDBObjectStore.prototype.keyPath;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @type {!DOMStringList}
|
|
348
|
+
*/
|
|
349
|
+
IDBObjectStore.prototype.indexNames;
|
|
350
|
+
|
|
351
|
+
/** @type {!IDBTransaction} */
|
|
352
|
+
IDBObjectStore.prototype.transaction;
|
|
353
|
+
|
|
354
|
+
/** @type {boolean} */
|
|
355
|
+
IDBObjectStore.prototype.autoIncrement;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @param {*} value The value to put into the object store.
|
|
359
|
+
* @param {!IDBKeyType=} key The key of this value.
|
|
360
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
361
|
+
*/
|
|
362
|
+
IDBObjectStore.prototype.put = function(value, key) {};
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @param {*} value The value to add into the object store.
|
|
366
|
+
* @param {!IDBKeyType=} key The key of this value.
|
|
367
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
368
|
+
*/
|
|
369
|
+
IDBObjectStore.prototype.add = function(value, key) {};
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @param {!IDBKeyType|!IDBKeyRange} key The key of this value.
|
|
373
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
374
|
+
*/
|
|
375
|
+
IDBObjectStore.prototype.delete = function(key) {};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* @param {!IDBKeyType|!IDBKeyRange} key The key of the document to retrieve.
|
|
379
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
380
|
+
*/
|
|
381
|
+
IDBObjectStore.prototype.get = function(key) {};
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
385
|
+
*/
|
|
386
|
+
IDBObjectStore.prototype.clear = function() {};
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* @param {?IDBKeyRange=} range The range of the cursor.
|
|
390
|
+
* Nullable because IE <11 has problems with undefined.
|
|
391
|
+
* @param {!IDBCursorDirection=} direction The direction of cursor enumeration.
|
|
392
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
393
|
+
*/
|
|
394
|
+
IDBObjectStore.prototype.openCursor = function(range, direction) {};
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* @param {string} name The name of the index.
|
|
398
|
+
* @param {string|!Array<string>} keyPath The path to the index key.
|
|
399
|
+
* @param {!IDBIndexParameters=} opt_paramters Optional parameters
|
|
400
|
+
* for the created index.
|
|
401
|
+
* @return {!IDBIndex} The IDBIndex object.
|
|
402
|
+
*/
|
|
403
|
+
IDBObjectStore.prototype.createIndex = function(name, keyPath, opt_paramters) {};
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* @param {string} name The name of the index to retrieve.
|
|
407
|
+
* @return {!IDBIndex} The IDBIndex object.
|
|
408
|
+
*/
|
|
409
|
+
IDBObjectStore.prototype.index = function(name) {};
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* @param {string} indexName The name of the index to remove.
|
|
413
|
+
* @return {undefined}
|
|
414
|
+
*/
|
|
415
|
+
IDBObjectStore.prototype.deleteIndex = function(indexName) {};
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* @param {(!IDBKeyType|IDBKeyRange)=} key The key of this value.
|
|
419
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
420
|
+
* @see http://www.w3.org/TR/IndexedDB/#widl-IDBObjectStore-count
|
|
421
|
+
*/
|
|
422
|
+
IDBObjectStore.prototype.count = function(key) {};
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* @param {(!IDBKeyType|IDBKeyRange)=} query
|
|
426
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
427
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getkey
|
|
428
|
+
*/
|
|
429
|
+
IDBObjectStore.prototype.getKey = function(query) {};
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* @param {(!IDBKeyType|IDBKeyRange)=} query
|
|
433
|
+
* @param {number=} count
|
|
434
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
435
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getall
|
|
436
|
+
*/
|
|
437
|
+
IDBObjectStore.prototype.getAll = function(query, count) {};
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @param {(!IDBKeyType|IDBKeyRange)=} query
|
|
441
|
+
* @param {number=} count
|
|
442
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
443
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getallkeys
|
|
444
|
+
*/
|
|
445
|
+
IDBObjectStore.prototype.getAllKeys = function(query, count) {};
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* @param {(!IDBKeyType|IDBKeyRange)=} query
|
|
449
|
+
* @param {!IDBCursorDirection=} direction
|
|
450
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
451
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-openkeycursor
|
|
452
|
+
*/
|
|
453
|
+
IDBObjectStore.prototype.openKeyCursor = function(query, direction) {};
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* @constructor
|
|
458
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBIndex
|
|
459
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#index-interface
|
|
460
|
+
*/
|
|
461
|
+
function IDBIndex() {}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* @type {string}
|
|
465
|
+
*/
|
|
466
|
+
IDBIndex.prototype.name;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* @const {!IDBObjectStore}
|
|
470
|
+
*/
|
|
471
|
+
IDBIndex.prototype.objectStore;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* @const {*}
|
|
475
|
+
*/
|
|
476
|
+
IDBIndex.prototype.keyPath;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @const {boolean}
|
|
480
|
+
*/
|
|
481
|
+
IDBIndex.prototype.multiEntry;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* @const {boolean}
|
|
485
|
+
*/
|
|
486
|
+
IDBIndex.prototype.unique;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* @param {(!IDBKeyType|?IDBKeyRange)=} range The range of the cursor.
|
|
490
|
+
* Nullable because IE <11 has problems with undefined.
|
|
491
|
+
* @param {!IDBCursorDirection=} direction The direction of cursor enumeration.
|
|
492
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
493
|
+
*/
|
|
494
|
+
IDBIndex.prototype.openCursor = function(range, direction) {};
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @param {(!IDBKeyType|?IDBKeyRange)=} range The range of the cursor.
|
|
498
|
+
* Nullable because IE <11 has problems with undefined.
|
|
499
|
+
* @param {!IDBCursorDirection=} direction The direction of cursor enumeration.
|
|
500
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
501
|
+
*/
|
|
502
|
+
IDBIndex.prototype.openKeyCursor = function(range, direction) {};
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @param {!IDBKeyType|!IDBKeyRange} key The id of the object to retrieve.
|
|
506
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
507
|
+
*/
|
|
508
|
+
IDBIndex.prototype.get = function(key) {};
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @param {!IDBKeyType|!IDBKeyRange} key The id of the object to retrieve.
|
|
512
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
513
|
+
*/
|
|
514
|
+
IDBIndex.prototype.getKey = function(key) {};
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* @param {(!IDBKeyType|!IDBKeyRange)=} query
|
|
518
|
+
* @param {number=} count
|
|
519
|
+
* @return {!IDBRequest}
|
|
520
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-getall
|
|
521
|
+
*/
|
|
522
|
+
IDBIndex.prototype.getAll = function(query, count) {};
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* @param {(!IDBKeyType|!IDBKeyRange)=} query
|
|
526
|
+
* @param {number=} count
|
|
527
|
+
* @return {!IDBRequest}
|
|
528
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-getallkeys
|
|
529
|
+
*/
|
|
530
|
+
IDBIndex.prototype.getAllKeys = function(query, count) {};
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* @param {(!IDBKeyType|!IDBKeyRange)=} opt_key
|
|
534
|
+
* @return {!IDBRequest}
|
|
535
|
+
*/
|
|
536
|
+
IDBIndex.prototype.count = function(opt_key) {};
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* @constructor
|
|
541
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursor
|
|
542
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#cursor-interface
|
|
543
|
+
*/
|
|
544
|
+
function IDBCursor() {}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* @const {(!IDBObjectStore|!IDBIndex)}
|
|
548
|
+
*/
|
|
549
|
+
IDBCursor.prototype.source;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* @const {!IDBCursorDirection}
|
|
553
|
+
*/
|
|
554
|
+
IDBCursor.prototype.direction;
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* @const {!IDBKeyType}
|
|
558
|
+
*/
|
|
559
|
+
IDBCursor.prototype.key;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* @const {!IDBKeyType}
|
|
563
|
+
*/
|
|
564
|
+
IDBCursor.prototype.primaryKey;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* @param {*} value The new value for the current object in the cursor.
|
|
568
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
569
|
+
*/
|
|
570
|
+
IDBCursor.prototype.update = function(value) {};
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Note: Must be quoted to avoid parse error.
|
|
574
|
+
* @param {!IDBKeyType=} key Continue enumerating the cursor from the specified
|
|
575
|
+
* key (or next).
|
|
576
|
+
* @return {undefined}
|
|
577
|
+
*/
|
|
578
|
+
IDBCursor.prototype.continue = function(key) {};
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* @param {!IDBKeyType} key
|
|
582
|
+
* @param {!IDBKeyType} primaryKey
|
|
583
|
+
* @return {undefined}
|
|
584
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbcursor-continueprimarykey
|
|
585
|
+
*/
|
|
586
|
+
IDBCursor.prototype.continuePrimaryKey = function(key, primaryKey) {};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @param {number} count Number of times to iterate the cursor.
|
|
590
|
+
* @return {undefined}
|
|
591
|
+
*/
|
|
592
|
+
IDBCursor.prototype.advance = function(count) {};
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Note: Must be quoted to avoid parse error.
|
|
596
|
+
* @return {!IDBRequest} The IDBRequest object.
|
|
597
|
+
*/
|
|
598
|
+
IDBCursor.prototype.delete = function() {};
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* @constructor
|
|
603
|
+
* @extends {IDBCursor}
|
|
604
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursorWithValue
|
|
605
|
+
*/
|
|
606
|
+
function IDBCursorWithValue() {}
|
|
607
|
+
|
|
608
|
+
/** @type {*} */
|
|
609
|
+
IDBCursorWithValue.prototype.value; // readonly
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* @constructor
|
|
614
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBTransaction
|
|
615
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#transaction
|
|
616
|
+
*/
|
|
617
|
+
function IDBTransaction() {}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* @const {!DOMStringList}
|
|
621
|
+
*/
|
|
622
|
+
IDBTransaction.prototype.objectStoreNames;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* @const {!IDBTransactionMode}
|
|
626
|
+
*/
|
|
627
|
+
IDBTransaction.prototype.mode;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* @const {!IDBDatabase}
|
|
631
|
+
*/
|
|
632
|
+
IDBTransaction.prototype.db;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* @type {!DOMError|!DOMException}
|
|
636
|
+
*/
|
|
637
|
+
IDBTransaction.prototype.error;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* @param {string} name The name of the object store to retrieve.
|
|
641
|
+
* @return {!IDBObjectStore} The object store.
|
|
642
|
+
*/
|
|
643
|
+
IDBTransaction.prototype.objectStore = function(name) {};
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Aborts the transaction.
|
|
647
|
+
* @return {undefined}
|
|
648
|
+
*/
|
|
649
|
+
IDBTransaction.prototype.abort = function() {};
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Commits the transaction.
|
|
653
|
+
* @return {undefined}
|
|
654
|
+
*/
|
|
655
|
+
IDBTransaction.prototype.commit = function() {};
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* @type {?function(!Event)}
|
|
659
|
+
*/
|
|
660
|
+
IDBTransaction.prototype.onabort;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* @type {?function(!Event)}
|
|
664
|
+
*/
|
|
665
|
+
IDBTransaction.prototype.oncomplete;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* @type {?function(!Event)}
|
|
669
|
+
*/
|
|
670
|
+
IDBTransaction.prototype.onerror;
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* @constructor
|
|
675
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBKeyRange
|
|
676
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#keyrange
|
|
677
|
+
*/
|
|
678
|
+
function IDBKeyRange() {}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* @const {*}
|
|
682
|
+
*/
|
|
683
|
+
IDBKeyRange.prototype.lower;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* @const {*}
|
|
687
|
+
*/
|
|
688
|
+
IDBKeyRange.prototype.upper;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* @const {boolean}
|
|
692
|
+
*/
|
|
693
|
+
IDBKeyRange.prototype.lowerOpen;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* @const {boolean}
|
|
697
|
+
*/
|
|
698
|
+
IDBKeyRange.prototype.upperOpen;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* @param {!IDBKeyType} value The single key value of this range.
|
|
702
|
+
* @return {!IDBKeyRange} The key range.
|
|
703
|
+
*/
|
|
704
|
+
IDBKeyRange.only = function(value) {};
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* @param {!IDBKeyType} bound Creates a lower bound key range.
|
|
708
|
+
* @param {boolean=} open Open the key range.
|
|
709
|
+
* @return {!IDBKeyRange} The key range.
|
|
710
|
+
*/
|
|
711
|
+
IDBKeyRange.lowerBound = function(bound, open) {};
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* @param {!IDBKeyType} bound Creates an upper bound key range.
|
|
715
|
+
* @param {boolean=} open Open the key range.
|
|
716
|
+
* @return {!IDBKeyRange} The key range.
|
|
717
|
+
*/
|
|
718
|
+
IDBKeyRange.upperBound = function(bound, open) {};
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* @param {!IDBKeyType} left The left bound value.
|
|
722
|
+
* @param {!IDBKeyType} right The right bound value.
|
|
723
|
+
* @param {boolean=} openLeft Whether the left bound value should be excluded.
|
|
724
|
+
* @param {boolean=} openRight Whether the right bound value should be excluded.
|
|
725
|
+
* @return {!IDBKeyRange} The key range.
|
|
726
|
+
*/
|
|
727
|
+
IDBKeyRange.bound = function(left, right, openLeft, openRight) {};
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* @param {!IDBKeyType} key
|
|
731
|
+
* @return {boolean}
|
|
732
|
+
* @see https://www.w3.org/TR/IndexedDB-2/#dom-idbkeyrange-includes
|
|
733
|
+
*/
|
|
734
|
+
IDBKeyRange.prototype.includes = function(key) {};
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* @param {string} type
|
|
739
|
+
* @param {!IDBVersionChangeEventInit=} opt_eventInit
|
|
740
|
+
* @constructor
|
|
741
|
+
* @extends {Event}
|
|
742
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEvent
|
|
743
|
+
*/
|
|
744
|
+
function IDBVersionChangeEvent(type, opt_eventInit) {}
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @const {number}
|
|
748
|
+
*/
|
|
749
|
+
IDBVersionChangeEvent.prototype.oldVersion;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* @const {?number}
|
|
753
|
+
*/
|
|
754
|
+
IDBVersionChangeEvent.prototype.newVersion;
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* @record
|
|
759
|
+
* @see https://www.w3.org/TR/IndexedDB/#dictdef-idbdatabaseinfo
|
|
760
|
+
*/
|
|
761
|
+
function IDBDatabaseInfo() {}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* @type {string|undefined}
|
|
765
|
+
*/
|
|
766
|
+
IDBDatabaseInfo.prototype.name;
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @type {number|undefined}
|
|
770
|
+
*/
|
|
771
|
+
IDBDatabaseInfo.prototype.version;
|