OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 // WebKit Web Facing API | 31 // WebKit Web Facing API |
32 | 32 |
33 /** | 33 /** |
34 * @param {!Object} object | 34 * @param {!Object} object |
35 * @param {!Function} callback | 35 * @param {!Function} callback |
36 */ | 36 */ |
37 Object.observe = function(object, callback) {} | 37 Object.observe = function(object, callback) {}; |
38 | 38 |
39 /** @type {boolean} */ | 39 /** @type {boolean} */ |
40 Event.prototype.isMetaOrCtrlForTest; | 40 Event.prototype.isMetaOrCtrlForTest; |
41 | 41 |
42 /** @type {string} */ | 42 /** @type {string} */ |
43 Event.prototype.code; | 43 Event.prototype.code; |
44 | 44 |
45 /** | 45 /** |
46 * TODO(luoe): MouseEvent properties movementX and movementY from the | 46 * TODO(luoe): MouseEvent properties movementX and movementY from the |
47 * PointerLock API are not yet standard. Once they are included in | 47 * PointerLock API are not yet standard. Once they are included in |
48 * Closure Compiler, these custom externs can be removed. | 48 * Closure Compiler, these custom externs can be removed. |
49 */ | 49 */ |
50 /** @type {number} */ | 50 /** @type {number} */ |
51 MouseEvent.prototype.movementX; | 51 MouseEvent.prototype.movementX; |
52 | 52 |
53 /** @type {number} */ | 53 /** @type {number} */ |
54 MouseEvent.prototype.movementY; | 54 MouseEvent.prototype.movementY; |
55 | 55 |
56 /** | 56 /** |
57 * @type {number} | 57 * @type {number} |
58 */ | 58 */ |
59 KeyboardEvent.DOM_KEY_LOCATION_NUMPAD; | 59 KeyboardEvent.DOM_KEY_LOCATION_NUMPAD; |
60 | 60 |
61 /** | 61 /** |
62 * @param {!T} value | 62 * @param {!T} value |
63 * @param {boolean=} onlyFirst | 63 * @param {boolean=} onlyFirst |
64 * @this {Array.<T>} | 64 * @this {Array.<T>} |
65 * @template T | 65 * @template T |
66 */ | 66 */ |
67 Array.prototype.remove = function(value, onlyFirst) {} | 67 Array.prototype.remove = function(value, onlyFirst) {}; |
68 /** | 68 /** |
69 * @param {!Array.<!T>} array | 69 * @param {!Array.<!T>} array |
70 * @this {Array.<!T>} | 70 * @this {Array.<!T>} |
71 * @template T | 71 * @template T |
72 */ | 72 */ |
73 Array.prototype.pushAll = function(array) {} | 73 Array.prototype.pushAll = function(array) {}; |
74 /** | 74 /** |
75 * @return {!Object.<string, boolean>} | 75 * @return {!Object.<string, boolean>} |
76 * @this {Array.<T>} | 76 * @this {Array.<T>} |
77 * @template T | 77 * @template T |
78 */ | 78 */ |
79 Array.prototype.keySet = function() {} | 79 Array.prototype.keySet = function() {}; |
80 /** | 80 /** |
81 * @param {number} index | 81 * @param {number} index |
82 * @return {!Array.<!T>} | 82 * @return {!Array.<!T>} |
83 * @this {Array.<T>} | 83 * @this {Array.<T>} |
84 * @template T | 84 * @template T |
85 */ | 85 */ |
86 Array.prototype.rotate = function(index) {} | 86 Array.prototype.rotate = function(index) {}; |
87 /** | 87 /** |
88 * @this {Array.<number>} | 88 * @this {Array.<number>} |
89 */ | 89 */ |
90 Array.prototype.sortNumbers = function() {} | 90 Array.prototype.sortNumbers = function() {}; |
91 /** | 91 /** |
92 * @param {!S} object | 92 * @param {!S} object |
93 * @param {function(!S,!T):number=} comparator | 93 * @param {function(!S,!T):number=} comparator |
94 * @return {number} | 94 * @return {number} |
95 * @this {Array.<T>} | 95 * @this {Array.<T>} |
96 * @template S | 96 * @template S |
97 */ | 97 */ |
98 Array.prototype.lowerBound = function(object, comparator) {} | 98 Array.prototype.lowerBound = function(object, comparator) {}; |
99 /** | 99 /** |
100 * @param {!S} object | 100 * @param {!S} object |
101 * @param {function(!S,!T):number=} comparator | 101 * @param {function(!S,!T):number=} comparator |
102 * @return {number} | 102 * @return {number} |
103 * @this {Array.<T>} | 103 * @this {Array.<T>} |
104 * @template S | 104 * @template S |
105 */ | 105 */ |
106 Array.prototype.upperBound = function(object, comparator) {} | 106 Array.prototype.upperBound = function(object, comparator) {}; |
107 /** | 107 /** |
108 * @param {!S} value | 108 * @param {!S} value |
109 * @param {function(!S,!T):number} comparator | 109 * @param {function(!S,!T):number} comparator |
110 * @return {number} | 110 * @return {number} |
111 * @this {Array.<T>} | 111 * @this {Array.<T>} |
112 * @template S | 112 * @template S |
113 */ | 113 */ |
114 Array.prototype.binaryIndexOf = function(value, comparator) {} | 114 Array.prototype.binaryIndexOf = function(value, comparator) {}; |
115 /** | 115 /** |
116 * @param {function(number, number): number} comparator | 116 * @param {function(number, number): number} comparator |
117 * @param {number} leftBound | 117 * @param {number} leftBound |
118 * @param {number} rightBound | 118 * @param {number} rightBound |
119 * @param {number} sortWindowLeft | 119 * @param {number} sortWindowLeft |
120 * @param {number} sortWindowRight | 120 * @param {number} sortWindowRight |
121 * @return {!Array.<number>} | 121 * @return {!Array.<number>} |
122 * @this {Array.<number>} | 122 * @this {Array.<number>} |
123 */ | 123 */ |
124 Array.prototype.sortRange = function(comparator, leftBound, rightBound, sortWind
owLeft, sortWindowRight) {} | 124 Array.prototype.sortRange = function(comparator, leftBound, rightBound, sortWind
owLeft, sortWindowRight) {}; |
125 | 125 |
126 /** | 126 /** |
127 * @param {function(!T,!T): number=} comparator | 127 * @param {function(!T,!T): number=} comparator |
128 * @return {!Array.<T>} | 128 * @return {!Array.<T>} |
129 * @this {Array.<T>} | 129 * @this {Array.<T>} |
130 * @template T | 130 * @template T |
131 */ | 131 */ |
132 Array.prototype.stableSort = function(comparator) {} | 132 Array.prototype.stableSort = function(comparator) {}; |
133 | 133 |
134 /** | 134 /** |
135 * @this {Array.<number>} | 135 * @this {Array.<number>} |
136 * @param {function(number,number):boolean} comparator | 136 * @param {function(number,number):boolean} comparator |
137 * @param {number} left | 137 * @param {number} left |
138 * @param {number} right | 138 * @param {number} right |
139 * @param {number} pivotIndex | 139 * @param {number} pivotIndex |
140 * @return {number} | 140 * @return {number} |
141 */ | 141 */ |
142 Array.prototype.partition = function(comparator, left, right, pivotIndex) {} | 142 Array.prototype.partition = function(comparator, left, right, pivotIndex) {}; |
143 | 143 |
144 /** | 144 /** |
145 * @this {Array.<number>} | 145 * @this {Array.<number>} |
146 * @param {number} k | 146 * @param {number} k |
147 * @param {function(number,number):boolean=} comparator | 147 * @param {function(number,number):boolean=} comparator |
148 * @return {number} | 148 * @return {number} |
149 */ | 149 */ |
150 Array.prototype.qselect = function(k, comparator) {} | 150 Array.prototype.qselect = function(k, comparator) {}; |
151 | 151 |
152 /** | 152 /** |
153 * @param {string} field | 153 * @param {string} field |
154 * @return {!Array.<!T>} | 154 * @return {!Array.<!T>} |
155 * @this {Array.<!Object.<string,T>>} | 155 * @this {Array.<!Object.<string,T>>} |
156 * @template T | 156 * @template T |
157 */ | 157 */ |
158 Array.prototype.select = function(field) {} | 158 Array.prototype.select = function(field) {}; |
159 | 159 |
160 /** | 160 /** |
161 * @return {!T|undefined} | 161 * @return {!T|undefined} |
162 * @this {Array.<T>} | 162 * @this {Array.<T>} |
163 * @template T | 163 * @template T |
164 */ | 164 */ |
165 Array.prototype.peekLast = function() {} | 165 Array.prototype.peekLast = function() {}; |
166 | 166 |
167 /** | 167 /** |
168 * @param {!Array.<T>} array | 168 * @param {!Array.<T>} array |
169 * @param {function(T,T):number} comparator | 169 * @param {function(T,T):number} comparator |
170 * @return {!Array.<T>} | 170 * @return {!Array.<T>} |
171 * @this {!Array.<T>} | 171 * @this {!Array.<T>} |
172 * @template T | 172 * @template T |
173 */ | 173 */ |
174 Array.prototype.intersectOrdered = function(array, comparator) {} | 174 Array.prototype.intersectOrdered = function(array, comparator) {}; |
175 | 175 |
176 /** | 176 /** |
177 * @param {!Array.<T>} array | 177 * @param {!Array.<T>} array |
178 * @param {function(T,T):number} comparator | 178 * @param {function(T,T):number} comparator |
179 * @return {!Array.<T>} | 179 * @return {!Array.<T>} |
180 * @this {!Array.<T>} | 180 * @this {!Array.<T>} |
181 * @template T | 181 * @template T |
182 */ | 182 */ |
183 Array.prototype.mergeOrdered = function(array, comparator) {} | 183 Array.prototype.mergeOrdered = function(array, comparator) {}; |
184 | 184 |
185 // File System API | 185 // File System API |
186 /** | 186 /** |
187 * @constructor | 187 * @constructor |
188 */ | 188 */ |
189 function DOMFileSystem() {} | 189 function DOMFileSystem() {} |
190 | 190 |
191 /** | 191 /** |
192 * @type {DirectoryEntry} | 192 * @type {DirectoryEntry} |
193 */ | 193 */ |
194 DOMFileSystem.prototype.root = null; | 194 DOMFileSystem.prototype.root = null; |
195 | 195 |
196 /** | 196 /** |
197 * @type {*} | 197 * @type {*} |
198 */ | 198 */ |
199 window.domAutomationController; | 199 window.domAutomationController; |
200 | 200 |
201 var DevToolsHost = function() {}; | 201 var DevToolsHost = function() {}; |
202 | 202 |
203 /** @typedef {{type:string, id:(number|undefined), | 203 /** @typedef {{type:string, id:(number|undefined), |
204 label:(string|undefined), enabled:(boolean|undefined), checked:(bo
olean|undefined), | 204 label:(string|undefined), enabled:(boolean|undefined), checked:(bo
olean|undefined), |
205 subItems:(!Array.<!DevToolsHost.ContextMenuDescriptor>|undefined)}
} */ | 205 subItems:(!Array.<!DevToolsHost.ContextMenuDescriptor>|undefined)}
} */ |
206 DevToolsHost.ContextMenuDescriptor; | 206 DevToolsHost.ContextMenuDescriptor; |
207 | 207 |
208 /** | 208 /** |
209 * @return {number} | 209 * @return {number} |
210 */ | 210 */ |
211 DevToolsHost.zoomFactor = function() { } | 211 DevToolsHost.zoomFactor = function() { }; |
212 | 212 |
213 /** | 213 /** |
214 * @param {string} origin | 214 * @param {string} origin |
215 * @param {string} script | 215 * @param {string} script |
216 */ | 216 */ |
217 DevToolsHost.setInjectedScriptForOrigin = function(origin, script) { } | 217 DevToolsHost.setInjectedScriptForOrigin = function(origin, script) { }; |
218 | 218 |
219 /** | 219 /** |
220 * @param {string} text | 220 * @param {string} text |
221 */ | 221 */ |
222 DevToolsHost.copyText = function(text) { } | 222 DevToolsHost.copyText = function(text) { }; |
223 | 223 |
224 /** | 224 /** |
225 * @return {string} | 225 * @return {string} |
226 */ | 226 */ |
227 DevToolsHost.platform = function() { } | 227 DevToolsHost.platform = function() { }; |
228 | 228 |
229 /** | 229 /** |
230 * @param {number} x | 230 * @param {number} x |
231 * @param {number} y | 231 * @param {number} y |
232 * @param {!Array.<!DevToolsHost.ContextMenuDescriptor>} items | 232 * @param {!Array.<!DevToolsHost.ContextMenuDescriptor>} items |
233 * @param {!Document} document | 233 * @param {!Document} document |
234 */ | 234 */ |
235 DevToolsHost.showContextMenuAtPoint = function(x, y, items, document) { } | 235 DevToolsHost.showContextMenuAtPoint = function(x, y, items, document) { }; |
236 | 236 |
237 /** | 237 /** |
238 * @param {string} message | 238 * @param {string} message |
239 */ | 239 */ |
240 DevToolsHost.sendMessageToEmbedder = function(message) { } | 240 DevToolsHost.sendMessageToEmbedder = function(message) { }; |
241 | 241 |
242 /** | 242 /** |
243 * @return {string} | 243 * @return {string} |
244 */ | 244 */ |
245 DevToolsHost.getSelectionBackgroundColor = function() { } | 245 DevToolsHost.getSelectionBackgroundColor = function() { }; |
246 | 246 |
247 /** | 247 /** |
248 * @return {string} | 248 * @return {string} |
249 */ | 249 */ |
250 DevToolsHost.getSelectionForegroundColor = function() { } | 250 DevToolsHost.getSelectionForegroundColor = function() { }; |
251 | 251 |
252 /** | 252 /** |
253 * @return {boolean} | 253 * @return {boolean} |
254 */ | 254 */ |
255 DevToolsHost.isUnderTest = function() { } | 255 DevToolsHost.isUnderTest = function() { }; |
256 | 256 |
257 /** | 257 /** |
258 * @return {boolean} | 258 * @return {boolean} |
259 */ | 259 */ |
260 DevToolsHost.isHostedMode = function() { } | 260 DevToolsHost.isHostedMode = function() { }; |
261 | 261 |
262 /** | 262 /** |
263 * @param {string} fileSystemId | 263 * @param {string} fileSystemId |
264 * @param {string} registeredName | 264 * @param {string} registeredName |
265 * @return {?DOMFileSystem} | 265 * @return {?DOMFileSystem} |
266 */ | 266 */ |
267 DevToolsHost.isolatedFileSystem = function(fileSystemId, registeredName) { } | 267 DevToolsHost.isolatedFileSystem = function(fileSystemId, registeredName) { }; |
268 | 268 |
269 /** | 269 /** |
270 * @param {!FileSystem} fileSystem | 270 * @param {!FileSystem} fileSystem |
271 */ | 271 */ |
272 DevToolsHost.upgradeDraggedFileSystemPermissions = function(fileSystem) { } | 272 DevToolsHost.upgradeDraggedFileSystemPermissions = function(fileSystem) { }; |
273 | 273 |
274 var WebInspector = function() {} | 274 var WebInspector = function() {}; |
275 | 275 |
276 /** Extensions API */ | 276 /** Extensions API */ |
277 | 277 |
278 /** @constructor */ | 278 /** @constructor */ |
279 function AuditCategory() {} | 279 function AuditCategory() {} |
280 /** @constructor */ | 280 /** @constructor */ |
281 function AuditResult() {} | 281 function AuditResult() {} |
282 /** @constructor */ | 282 /** @constructor */ |
283 function EventSink() {} | 283 function EventSink() {} |
284 /** @constructor */ | 284 /** @constructor */ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 { | 333 { |
334 } | 334 } |
335 | 335 |
336 diff_match_patch.prototype = { | 336 diff_match_patch.prototype = { |
337 /** | 337 /** |
338 * @param {string} text1 | 338 * @param {string} text1 |
339 * @param {string} text2 | 339 * @param {string} text2 |
340 * @return {!Array.<!{0: number, 1: string}>} | 340 * @return {!Array.<!{0: number, 1: string}>} |
341 */ | 341 */ |
342 diff_main: function(text1, text2) { } | 342 diff_main: function(text1, text2) { } |
343 } | 343 }; |
344 | 344 |
345 /** @constructor */ | 345 /** @constructor */ |
346 function Path2D() {} | 346 function Path2D() {} |
347 Path2D.prototype = { | 347 Path2D.prototype = { |
348 /** | 348 /** |
349 * @param {number} x | 349 * @param {number} x |
350 * @param {number} y | 350 * @param {number} y |
351 * @param {number} w | 351 * @param {number} w |
352 * @param {number} h | 352 * @param {number} h |
353 */ | 353 */ |
354 rect: function(x, y, w, h) { }, | 354 rect: function(x, y, w, h) { }, |
355 /** | 355 /** |
356 * @param {number} x | 356 * @param {number} x |
357 * @param {number} y | 357 * @param {number} y |
358 */ | 358 */ |
359 moveTo: function(x, y) { }, | 359 moveTo: function(x, y) { }, |
360 /** | 360 /** |
361 * @param {number} x | 361 * @param {number} x |
362 * @param {number} y | 362 * @param {number} y |
363 */ | 363 */ |
364 lineTo: function(x, y) { } | 364 lineTo: function(x, y) { } |
365 } | 365 }; |
366 | 366 |
367 /** @constructor */ | 367 /** @constructor */ |
368 var Doc = function() { } | 368 var Doc = function() { }; |
369 Doc.prototype = { | 369 Doc.prototype = { |
370 /** @type {number} */ | 370 /** @type {number} */ |
371 scrollLeft: 0, | 371 scrollLeft: 0, |
372 /** @type {number} */ | 372 /** @type {number} */ |
373 scrollTop: 0 | 373 scrollTop: 0 |
374 } | 374 }; |
375 | 375 |
376 /** @constructor */ | 376 /** @constructor */ |
377 var CodeMirror = function(element, config) { } | 377 var CodeMirror = function(element, config) { }; |
378 CodeMirror.on = function(obj, type, handler) { } | 378 CodeMirror.on = function(obj, type, handler) { }; |
379 CodeMirror.prototype = { | 379 CodeMirror.prototype = { |
380 /** @type {!Doc} */ | 380 /** @type {!Doc} */ |
381 doc: null, | 381 doc: null, |
382 addKeyMap: function(map) { }, | 382 addKeyMap: function(map) { }, |
383 addLineClass: function(handle, where, cls) { }, | 383 addLineClass: function(handle, where, cls) { }, |
384 /** | 384 /** |
385 * @param {?Object=} options | 385 * @param {?Object=} options |
386 * @return {!CodeMirror.LineWidget} | 386 * @return {!CodeMirror.LineWidget} |
387 */ | 387 */ |
388 addLineWidget: function(handle, node, options) { }, | 388 addLineWidget: function(handle, node, options) { }, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 * @param {number=} primaryIndex | 513 * @param {number=} primaryIndex |
514 * @param {?Object=} config | 514 * @param {?Object=} config |
515 */ | 515 */ |
516 setSelections: function(selections, primaryIndex, config) { }, | 516 setSelections: function(selections, primaryIndex, config) { }, |
517 setSize: function(width, height) { }, | 517 setSize: function(width, height) { }, |
518 setValue: function(code) { }, | 518 setValue: function(code) { }, |
519 somethingSelected: function() { }, | 519 somethingSelected: function() { }, |
520 swapDoc: function(doc) { }, | 520 swapDoc: function(doc) { }, |
521 undo: function() { }, | 521 undo: function() { }, |
522 unlinkDoc: function(other) { } | 522 unlinkDoc: function(other) { } |
523 } | 523 }; |
524 /** @type {!{cursorDiv: Element}} */ | 524 /** @type {!{cursorDiv: Element}} */ |
525 CodeMirror.prototype.display; | 525 CodeMirror.prototype.display; |
526 /** @type {!Object} */ | 526 /** @type {!Object} */ |
527 CodeMirror.Pass; | 527 CodeMirror.Pass; |
528 CodeMirror.showHint = function(codeMirror, hintintFunction) { }; | 528 CodeMirror.showHint = function(codeMirror, hintintFunction) { }; |
529 CodeMirror.commands = {}; | 529 CodeMirror.commands = {}; |
530 CodeMirror.modes = {}; | 530 CodeMirror.modes = {}; |
531 CodeMirror.mimeModes = {}; | 531 CodeMirror.mimeModes = {}; |
532 CodeMirror.getMode = function(options, spec) { }; | 532 CodeMirror.getMode = function(options, spec) { }; |
533 CodeMirror.overlayMode = function(mode1, mode2, squashSpans) { }; | 533 CodeMirror.overlayMode = function(mode1, mode2, squashSpans) { }; |
534 CodeMirror.defineMode = function(modeName, modeConstructor) { }; | 534 CodeMirror.defineMode = function(modeName, modeConstructor) { }; |
535 CodeMirror.startState = function(mode) { }; | 535 CodeMirror.startState = function(mode) { }; |
536 | 536 |
537 /** @typedef {{canceled: boolean, from: !CodeMirror.Pos, to: !CodeMirror.Pos, te
xt: string, origin: string, cancel: function()}} */ | 537 /** @typedef {{canceled: boolean, from: !CodeMirror.Pos, to: !CodeMirror.Pos, te
xt: string, origin: string, cancel: function()}} */ |
538 CodeMirror.BeforeChangeObject; | 538 CodeMirror.BeforeChangeObject; |
539 | 539 |
540 /** @typedef {{from: !CodeMirror.Pos, to: !CodeMirror.Pos, origin: string, text:
!Array.<string>, removed: !Array.<string>}} */ | 540 /** @typedef {{from: !CodeMirror.Pos, to: !CodeMirror.Pos, origin: string, text:
!Array.<string>, removed: !Array.<string>}} */ |
541 CodeMirror.ChangeObject; | 541 CodeMirror.ChangeObject; |
542 | 542 |
543 /** @constructor */ | 543 /** @constructor */ |
544 CodeMirror.Pos = function(line, ch) { } | 544 CodeMirror.Pos = function(line, ch) { }; |
545 /** @type {number} */ | 545 /** @type {number} */ |
546 CodeMirror.Pos.prototype.line; | 546 CodeMirror.Pos.prototype.line; |
547 /** @type {number} */ | 547 /** @type {number} */ |
548 CodeMirror.Pos.prototype.ch; | 548 CodeMirror.Pos.prototype.ch; |
549 | 549 |
550 /** | 550 /** |
551 * @param {!CodeMirror.Pos} pos1 | 551 * @param {!CodeMirror.Pos} pos1 |
552 * @param {!CodeMirror.Pos} pos2 | 552 * @param {!CodeMirror.Pos} pos2 |
553 * @return {number} | 553 * @return {number} |
554 */ | 554 */ |
555 CodeMirror.cmpPos = function(pos1, pos2) { }; | 555 CodeMirror.cmpPos = function(pos1, pos2) { }; |
556 | 556 |
557 /** | 557 /** |
558 * @param {string} mode | 558 * @param {string} mode |
559 * @param {?} definition | 559 * @param {?} definition |
560 */ | 560 */ |
561 CodeMirror.defineSimpleMode = function(mode, definition) {}; | 561 CodeMirror.defineSimpleMode = function(mode, definition) {}; |
562 | 562 |
563 /** @constructor */ | 563 /** @constructor */ |
564 CodeMirror.StringStream = function(line) | 564 CodeMirror.StringStream = function(line) |
565 { | 565 { |
566 this.pos = 0; | 566 this.pos = 0; |
567 this.start = 0; | 567 this.start = 0; |
568 } | 568 }; |
569 CodeMirror.StringStream.prototype = { | 569 CodeMirror.StringStream.prototype = { |
570 backUp: function(n) { }, | 570 backUp: function(n) { }, |
571 column: function() { }, | 571 column: function() { }, |
572 current: function() { }, | 572 current: function() { }, |
573 eat: function(match) { }, | 573 eat: function(match) { }, |
574 eatSpace: function() { }, | 574 eatSpace: function() { }, |
575 eatWhile: function(match) { }, | 575 eatWhile: function(match) { }, |
576 eol: function() { }, | 576 eol: function() { }, |
577 indentation: function() { }, | 577 indentation: function() { }, |
578 /** | 578 /** |
579 * @param {!RegExp|string} pattern | 579 * @param {!RegExp|string} pattern |
580 * @param {boolean=} consume | 580 * @param {boolean=} consume |
581 * @param {boolean=} caseInsensitive | 581 * @param {boolean=} caseInsensitive |
582 */ | 582 */ |
583 match: function(pattern, consume, caseInsensitive) { }, | 583 match: function(pattern, consume, caseInsensitive) { }, |
584 next: function() { }, | 584 next: function() { }, |
585 peek: function() { }, | 585 peek: function() { }, |
586 skipTo: function(ch) { }, | 586 skipTo: function(ch) { }, |
587 skipToEnd: function() { }, | 587 skipToEnd: function() { }, |
588 sol: function() { } | 588 sol: function() { } |
589 } | 589 }; |
590 | 590 |
591 /** @constructor */ | 591 /** @constructor */ |
592 CodeMirror.TextMarker = function(doc, type) { } | 592 CodeMirror.TextMarker = function(doc, type) { }; |
593 CodeMirror.TextMarker.prototype = { | 593 CodeMirror.TextMarker.prototype = { |
594 clear: function() { }, | 594 clear: function() { }, |
595 find: function() { }, | 595 find: function() { }, |
596 changed: function() { } | 596 changed: function() { } |
597 } | 597 }; |
598 | 598 |
599 /** @constructor */ | 599 /** @constructor */ |
600 CodeMirror.LineWidget = function() { } | 600 CodeMirror.LineWidget = function() { }; |
601 CodeMirror.LineWidget.prototype = { | 601 CodeMirror.LineWidget.prototype = { |
602 clear: function() { } | 602 clear: function() { } |
603 } | 603 }; |
604 | 604 |
605 | 605 |
606 /** @type {Object.<string, !Object.<string, string>>} */ | 606 /** @type {Object.<string, !Object.<string, string>>} */ |
607 CodeMirror.keyMap; | 607 CodeMirror.keyMap; |
608 | 608 |
609 /** @type {{scrollLeft: number, scrollTop: number}} */ | 609 /** @type {{scrollLeft: number, scrollTop: number}} */ |
610 CodeMirror.doc; | 610 CodeMirror.doc; |
611 | 611 |
612 /** @type {boolean} */ | 612 /** @type {boolean} */ |
613 window.dispatchStandaloneTestRunnerMessages; | 613 window.dispatchStandaloneTestRunnerMessages; |
614 | 614 |
615 /** | 615 /** |
616 * @param {*} obj | 616 * @param {*} obj |
617 * @return {boolean} | 617 * @return {boolean} |
618 */ | 618 */ |
619 ArrayBuffer.isView = function(obj) { } | 619 ArrayBuffer.isView = function(obj) { }; |
620 | 620 |
621 /** | 621 /** |
622 * @param {Array.<Object>} keyframes | 622 * @param {Array.<Object>} keyframes |
623 * @param {number|Object} timing | 623 * @param {number|Object} timing |
624 * @return {Object} | 624 * @return {Object} |
625 */ | 625 */ |
626 Element.prototype.animate = function(keyframes, timing) { } | 626 Element.prototype.animate = function(keyframes, timing) { }; |
627 | 627 |
628 /** | 628 /** |
629 * @override | 629 * @override |
630 * @param {string} type | 630 * @param {string} type |
631 * @param {(!EventListener|!function (!Event): (boolean|undefined)|null)} listen
er | 631 * @param {(!EventListener|!function (!Event): (boolean|undefined)|null)} listen
er |
632 * @param {(boolean|!{capture: (boolean|undefined), once: (boolean|undefined), p
assive: (boolean|undefined)})=} options | 632 * @param {(boolean|!{capture: (boolean|undefined), once: (boolean|undefined), p
assive: (boolean|undefined)})=} options |
633 * @this {EventTarget} | 633 * @this {EventTarget} |
634 */ | 634 */ |
635 Element.prototype.addEventListener = function(type, listener, options) { } | 635 Element.prototype.addEventListener = function(type, listener, options) { }; |
636 | 636 |
637 var acorn = { | 637 var acorn = { |
638 /** | 638 /** |
639 * @param {string} text | 639 * @param {string} text |
640 * @param {Object.<string, boolean>} options | 640 * @param {Object.<string, boolean>} options |
641 * @return {!ESTree.Node} | 641 * @return {!ESTree.Node} |
642 */ | 642 */ |
643 parse: function(text, options) {}, | 643 parse: function(text, options) {}, |
644 | 644 |
645 /** | 645 /** |
(...skipping 15 matching lines...) Expand all Loading... |
661 } | 661 } |
662 }; | 662 }; |
663 | 663 |
664 var Acorn = {}; | 664 var Acorn = {}; |
665 /** | 665 /** |
666 * @constructor | 666 * @constructor |
667 */ | 667 */ |
668 Acorn.Tokenizer = function() { | 668 Acorn.Tokenizer = function() { |
669 /** @type {function():!Acorn.Token} */ | 669 /** @type {function():!Acorn.Token} */ |
670 this.getToken; | 670 this.getToken; |
671 } | 671 }; |
672 | 672 |
673 /** | 673 /** |
674 * @constructor | 674 * @constructor |
675 */ | 675 */ |
676 Acorn.TokenType = function() { | 676 Acorn.TokenType = function() { |
677 /** @type {string} */ | 677 /** @type {string} */ |
678 this.label; | 678 this.label; |
679 /** @type {(string|undefined)} */ | 679 /** @type {(string|undefined)} */ |
680 this.keyword; | 680 this.keyword; |
681 } | 681 }; |
682 | 682 |
683 /** | 683 /** |
684 * @typedef {{type: !Acorn.TokenType, value: string, start: number, end: number}
} | 684 * @typedef {{type: !Acorn.TokenType, value: string, start: number, end: number}
} |
685 */ | 685 */ |
686 Acorn.Token; | 686 Acorn.Token; |
687 | 687 |
688 /** | 688 /** |
689 * @typedef {{type: string, value: string, start: number, end: number}} | 689 * @typedef {{type: string, value: string, start: number, end: number}} |
690 */ | 690 */ |
691 Acorn.Comment; | 691 Acorn.Comment; |
(...skipping 29 matching lines...) Expand all Loading... |
721 /** @type {(string|undefined)} */ | 721 /** @type {(string|undefined)} */ |
722 this.name; | 722 this.name; |
723 /** @type {(?ESTree.Node|undefined)} */ | 723 /** @type {(?ESTree.Node|undefined)} */ |
724 this.id; | 724 this.id; |
725 /** @type {(number|undefined)} */ | 725 /** @type {(number|undefined)} */ |
726 this.length; | 726 this.length; |
727 /** @type {(?ESTree.Node|undefined)} */ | 727 /** @type {(?ESTree.Node|undefined)} */ |
728 this.argument; | 728 this.argument; |
729 /** @type {(string|undefined)} */ | 729 /** @type {(string|undefined)} */ |
730 this.operator; | 730 this.operator; |
731 } | 731 }; |
732 | 732 |
733 /** | 733 /** |
734 * @extends {ESTree.Node} | 734 * @extends {ESTree.Node} |
735 * @constructor | 735 * @constructor |
736 */ | 736 */ |
737 ESTree.TemplateLiteralNode = function() | 737 ESTree.TemplateLiteralNode = function() |
738 { | 738 { |
739 /** @type {!Array.<!ESTree.Node>} */ | 739 /** @type {!Array.<!ESTree.Node>} */ |
740 this.quasis; | 740 this.quasis; |
741 /** @type {!Array.<!ESTree.Node>} */ | 741 /** @type {!Array.<!ESTree.Node>} */ |
742 this.expressions; | 742 this.expressions; |
743 } | 743 }; |
744 | 744 |
745 var Gonzales = {} | 745 var Gonzales = {}; |
746 var gonzales = { | 746 var gonzales = { |
747 /** | 747 /** |
748 * @param {string} text | 748 * @param {string} text |
749 * @param {!Object=} options | 749 * @param {!Object=} options |
750 * @return {!Gonzales.Node} | 750 * @return {!Gonzales.Node} |
751 */ | 751 */ |
752 parse: function(text, options) { }, | 752 parse: function(text, options) { }, |
753 } | 753 }; |
754 | 754 |
755 /** | 755 /** |
756 * @constructor | 756 * @constructor |
757 */ | 757 */ |
758 Gonzales.Location = function() | 758 Gonzales.Location = function() |
759 { | 759 { |
760 /** @type {number} */ | 760 /** @type {number} */ |
761 this.line; | 761 this.line; |
762 /** @type {number} */ | 762 /** @type {number} */ |
763 this.column; | 763 this.column; |
764 } | 764 }; |
765 | 765 |
766 /** | 766 /** |
767 * @constructor | 767 * @constructor |
768 */ | 768 */ |
769 Gonzales.Node = function() | 769 Gonzales.Node = function() |
770 { | 770 { |
771 /** @type {string} */ | 771 /** @type {string} */ |
772 this.type; | 772 this.type; |
773 /** @type {string} */ | 773 /** @type {string} */ |
774 this.syntax; | 774 this.syntax; |
775 /** @type {!Gonzales.Location} */ | 775 /** @type {!Gonzales.Location} */ |
776 this.start; | 776 this.start; |
777 /** @type {!Gonzales.Location} */ | 777 /** @type {!Gonzales.Location} */ |
778 this.end; | 778 this.end; |
779 /** @type {(string|!Array<!Gonzales.Node>)} */ | 779 /** @type {(string|!Array<!Gonzales.Node>)} */ |
780 this.content; | 780 this.content; |
781 } | 781 }; |
782 | 782 |
783 /** | 783 /** |
784 * @type {string} | 784 * @type {string} |
785 * @see http://heycam.github.io/webidl/#es-DOMException-prototype-object | 785 * @see http://heycam.github.io/webidl/#es-DOMException-prototype-object |
786 * TODO(jsbell): DOMException should be a subclass of Error. | 786 * TODO(jsbell): DOMException should be a subclass of Error. |
787 */ | 787 */ |
788 DOMException.prototype.message; | 788 DOMException.prototype.message; |
789 | 789 |
790 /** | 790 /** |
791 * @constructor | 791 * @constructor |
792 * @param {!Object} params | 792 * @param {!Object} params |
793 */ | 793 */ |
794 var Terminal = function(params) { } | 794 var Terminal = function(params) { }; |
795 | 795 |
796 Terminal.prototype = { | 796 Terminal.prototype = { |
797 fit: function() { }, | 797 fit: function() { }, |
798 linkify: function() { }, | 798 linkify: function() { }, |
799 /** @param {!Element} element */ | 799 /** @param {!Element} element */ |
800 open: function(element) { }, | 800 open: function(element) { }, |
801 /** @param {string} eventName * @param {!Function} handler */ | 801 /** @param {string} eventName * @param {!Function} handler */ |
802 on: function(eventName, handler) { } | 802 on: function(eventName, handler) { } |
803 } | 803 }; |
OLD | NEW |