Skip to content

Commit be70510

Browse files
committed
update jQuery extern
1 parent 51a114a commit be70510

File tree

1 file changed

+52
-8
lines changed

1 file changed

+52
-8
lines changed

javascript/externs/lib/jquery-3.2.js

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ jQuery.prototype.add = function(arg1, context) {};
200200
jQuery.prototype.addBack = function(arg1) {};
201201

202202
/**
203-
* @param {(string|function(number,String))} arg1
203+
* @param {(string|Array<string>|function(number,String))} arg1
204204
* @return {!jQuery}
205205
*/
206206
jQuery.prototype.addClass = function(arg1) {};
@@ -305,8 +305,16 @@ jQuery.prototype.append = function(arg1, content) {};
305305
jQuery.prototype.appendTo = function(target) {};
306306

307307
/**
308-
* @param {(string|Object<string,*>)} arg1
309-
* @param {(string|number|boolean|function(number,string))=} arg2
308+
* Only call this method with the following combinations of arguments:
309+
* function(string, (string|number|undefined))
310+
* function(!Object<string, (string|number)>)
311+
* function(string, function(this:Element number,string):(string|number))
312+
*
313+
* See https://api.jquery.com/attr/#attr2
314+
*
315+
* @param {(string|!Object<string,(string|number)>)} arg1
316+
* @param {(string|number|function(this:Element,number,string):(string|number))=}
317+
* arg2
310318
* @return {(string|!jQuery)}
311319
*/
312320
jQuery.prototype.attr = function(arg1, arg2) {};
@@ -331,6 +339,7 @@ jQuery.prototype.bind = function(arg1, eventData, arg3) {};
331339
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
332340
* @param {function(!jQuery.Event)=} handler
333341
* @return {!jQuery}
342+
* @deprecated Please use .on( "blur", handler ) instead.
334343
*/
335344
jQuery.prototype.blur = function(arg1, handler) {};
336345

@@ -408,6 +417,7 @@ jQuery.callbacks.prototype.remove = function(callbacks) {};
408417
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
409418
* @param {function(!jQuery.Event)=} handler
410419
* @return {!jQuery}
420+
* @deprecated Please use .on( "change", handler ) instead.
411421
*/
412422
jQuery.prototype.change = function(arg1, handler) {};
413423

@@ -428,6 +438,7 @@ jQuery.prototype.clearQueue = function(queueName) {};
428438
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
429439
* @param {function(!jQuery.Event)=} handler
430440
* @return {!jQuery}
441+
* @deprecated Please use .on( "click", handler ) instead.
431442
*/
432443
jQuery.prototype.click = function(arg1, handler) {};
433444

@@ -461,6 +472,14 @@ jQuery.contains = function(container, contained) {};
461472
*/
462473
jQuery.prototype.contents = function() {};
463474

475+
/**
476+
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
477+
* @param {function(!jQuery.Event)=} handler
478+
* @return {!jQuery}
479+
* @deprecated Please use .on( "contextmenu", handler ) instead.
480+
*/
481+
jQuery.prototype.contextmenu = function(arg1, handler) {};
482+
464483
/**
465484
* @param {(string|Object<string,*>)} arg1
466485
* @param {(string|number|function(number,*))=} arg2
@@ -491,6 +510,7 @@ jQuery.prototype.data = function(arg1, value) {};
491510
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
492511
* @param {function(!jQuery.Event)=} handler
493512
* @return {!jQuery}
513+
* @deprecated Please use .on( "dblclick", handler ) instead.
494514
*/
495515
jQuery.prototype.dblclick = function(arg1, handler) {};
496516

@@ -845,7 +865,7 @@ jQuery.Event.prototype.type;
845865
/** @type {Window} */
846866
jQuery.Event.prototype.view;
847867

848-
/** @type {number} */
868+
/** @type {number} @deprecated */
849869
jQuery.Event.prototype.which;
850870

851871
/**
@@ -922,20 +942,23 @@ jQuery.fn = jQuery.prototype;
922942
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
923943
* @param {function(!jQuery.Event)=} handler
924944
* @return {!jQuery}
945+
* @deprecated Please use .on( "focus", handler ) instead.
925946
*/
926947
jQuery.prototype.focus = function(arg1, handler) {};
927948

928949
/**
929950
* @param {(function(!jQuery.Event)|Object<string, *>)} arg1
930951
* @param {function(!jQuery.Event)=} handler
931952
* @return {!jQuery}
953+
* @deprecated Please use .on( "focusin", handler ) instead.
932954
*/
933955
jQuery.prototype.focusin = function(arg1, handler) {};
934956

935957
/**
936958
* @param {(function(!jQuery.Event)|Object<string, *>)} arg1
937959
* @param {function(!jQuery.Event)=} handler
938960
* @return {!jQuery}
961+
* @deprecated Please use .on( "focusout", handler ) instead.
939962
*/
940963
jQuery.prototype.focusout = function(arg1, handler) {};
941964

@@ -1040,6 +1063,7 @@ jQuery.holdReady = function(hold) {};
10401063
* @param {function(!jQuery.Event)} arg1
10411064
* @param {function(!jQuery.Event)=} handlerOut
10421065
* @return {!jQuery}
1066+
* @deprecated Please use .on( "mouseenter", handler ) and .on( "mouseleave", handler ) instead.
10431067
*/
10441068
jQuery.prototype.hover = function(arg1, handlerOut) {};
10451069

@@ -1121,13 +1145,15 @@ jQuery.isEmptyObject = function(obj) {};
11211145
* @param {*} obj
11221146
* @return {boolean}
11231147
* @nosideeffects
1148+
* @deprecated
11241149
*/
11251150
jQuery.isFunction = function(obj) {};
11261151

11271152
/**
11281153
* @param {*} value
11291154
* @return {boolean}
11301155
* @nosideeffects
1156+
* @deprecated
11311157
*/
11321158
jQuery.isNumeric = function(value) {};
11331159

@@ -1142,6 +1168,7 @@ jQuery.isPlainObject = function(obj) {};
11421168
* @param {*} obj
11431169
* @return {boolean}
11441170
* @nosideeffects
1171+
* @deprecated
11451172
*/
11461173
jQuery.isWindow = function(obj) {};
11471174

@@ -1262,20 +1289,23 @@ jQuery.jqXHR.prototype.then =
12621289
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
12631290
* @param {function(!jQuery.Event)=} handler
12641291
* @return {!jQuery}
1292+
* @deprecated Please use .on( "keydown", handler ) instead.
12651293
*/
12661294
jQuery.prototype.keydown = function(arg1, handler) {};
12671295

12681296
/**
12691297
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
12701298
* @param {function(!jQuery.Event)=} handler
12711299
* @return {!jQuery}
1300+
* @deprecated Please use .on( "keypress", handler ) instead.
12721301
*/
12731302
jQuery.prototype.keypress = function(arg1, handler) {};
12741303

12751304
/**
12761305
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
12771306
* @param {function(!jQuery.Event)=} handler
12781307
* @return {!jQuery}
1308+
* @deprecated Please use .on( "keyup", handler ) instead.
12791309
*/
12801310
jQuery.prototype.keyup = function(arg1, handler) {};
12811311

@@ -1290,7 +1320,7 @@ jQuery.prototype.length;
12901320

12911321
/**
12921322
* @param {*} obj
1293-
* @return {Array<*>}
1323+
* @return {!Array<*>}
12941324
* @nosideeffects
12951325
*/
12961326
jQuery.makeArray = function(obj) {};
@@ -1320,48 +1350,55 @@ jQuery.merge = function(first, second) {};
13201350
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
13211351
* @param {function(!jQuery.Event)=} handler
13221352
* @return {!jQuery}
1353+
* @deprecated Please use .on( "mousedown", handler ) instead.
13231354
*/
13241355
jQuery.prototype.mousedown = function(arg1, handler) {};
13251356

13261357
/**
13271358
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
13281359
* @param {function(!jQuery.Event)=} handler
13291360
* @return {!jQuery}
1361+
* @deprecated Please use .on( "mousenter", handler ) instead.
13301362
*/
13311363
jQuery.prototype.mouseenter = function(arg1, handler) {};
13321364

13331365
/**
13341366
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
13351367
* @param {function(!jQuery.Event)=} handler
13361368
* @return {!jQuery}
1369+
* @deprecated Please use .on( "mouseleave", handler ) instead.
13371370
*/
13381371
jQuery.prototype.mouseleave = function(arg1, handler) {};
13391372

13401373
/**
13411374
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
13421375
* @param {function(!jQuery.Event)=} handler
13431376
* @return {!jQuery}
1377+
* @deprecated Please use .on( "mousemove", handler ) instead.
13441378
*/
13451379
jQuery.prototype.mousemove = function(arg1, handler) {};
13461380

13471381
/**
13481382
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
13491383
* @param {function(!jQuery.Event)=} handler
13501384
* @return {!jQuery}
1385+
* @deprecated Please use .on( "mouseout", handler ) instead.
13511386
*/
13521387
jQuery.prototype.mouseout = function(arg1, handler) {};
13531388

13541389
/**
13551390
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
13561391
* @param {function(!jQuery.Event)=} handler
13571392
* @return {!jQuery}
1393+
* @deprecated Please use .on( "mouseover", handler ) instead.
13581394
*/
13591395
jQuery.prototype.mouseover = function(arg1, handler) {};
13601396

13611397
/**
13621398
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
13631399
* @param {function(!jQuery.Event)=} handler
13641400
* @return {!jQuery}
1401+
* @deprecated Please use .on( "mouseup", handler ) instead.
13651402
*/
13661403
jQuery.prototype.mouseup = function(arg1, handler) {};
13671404

@@ -1389,7 +1426,7 @@ jQuery.prototype.nextUntil = function(arg1, filter) {};
13891426

13901427
/**
13911428
* @param {boolean=} removeAll
1392-
* @return {Object}
1429+
* @return {!typeof jQuery}
13931430
*/
13941431
jQuery.noConflict = function(removeAll) {};
13951432

@@ -1408,6 +1445,7 @@ jQuery.prototype.not = function(arg1) {};
14081445
/**
14091446
* @return {number}
14101447
* @nosideeffects
1448+
* @deprecated
14111449
*/
14121450
jQuery.now = function() {};
14131451

@@ -1655,6 +1693,7 @@ jQuery.prototype.prop = function(arg1, arg2) {};
16551693
/**
16561694
* @param {...*} var_args
16571695
* @return {function()}
1696+
* @deprecated
16581697
*/
16591698
jQuery.proxy = function(var_args) {};
16601699

@@ -1709,7 +1748,7 @@ jQuery.prototype.remove = function(selector) {};
17091748
jQuery.prototype.removeAttr = function(attributeName) {};
17101749

17111750
/**
1712-
* @param {(string|function(number,string))=} arg1
1751+
* @param {(string|Array<string>|function(number,string))=} arg1
17131752
* @return {!jQuery}
17141753
*/
17151754
jQuery.prototype.removeClass = function(arg1) {};
@@ -1749,13 +1788,15 @@ jQuery.prototype.replaceWith = function(arg1) {};
17491788
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
17501789
* @param {function(!jQuery.Event)=} handler
17511790
* @return {!jQuery}
1791+
* @deprecated Please use .on( "resize", handler ) instead.
17521792
*/
17531793
jQuery.prototype.resize = function(arg1, handler) {};
17541794

17551795
/**
17561796
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
17571797
* @param {function(!jQuery.Event)=} handler
17581798
* @return {!jQuery}
1799+
* @deprecated Please use .on( "scroll", handler ) instead.
17591800
*/
17601801
jQuery.prototype.scroll = function(arg1, handler) {};
17611802

@@ -1775,6 +1816,7 @@ jQuery.prototype.scrollTop = function(value) {};
17751816
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
17761817
* @param {function(!jQuery.Event)=} handler
17771818
* @return {!jQuery}
1819+
* @deprecated Please use .on( "select", handler ) instead.
17781820
*/
17791821
jQuery.prototype.select = function(arg1, handler) {};
17801822

@@ -1859,6 +1901,7 @@ jQuery.prototype.stop = function(arg1, arg2, jumpToEnd) {};
18591901
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
18601902
* @param {function(!jQuery.Event)=} handler
18611903
* @return {!jQuery}
1904+
* @deprecated Please use .on( "submit", handler ) instead.
18621905
*/
18631906
jQuery.prototype.submit = function(arg1, handler) {};
18641907

@@ -1932,7 +1975,7 @@ jQuery.prototype.toArray = function() {};
19321975
jQuery.prototype.toggle = function(arg1, arg2, arg3) {};
19331976

19341977
/**
1935-
* @param {(string|function(number,string,boolean))} arg1
1978+
* @param {(string|Array<string>|function(number,string,boolean))} arg1
19361979
* @param {boolean=} flag
19371980
* @return {!jQuery}
19381981
*/
@@ -1963,6 +2006,7 @@ jQuery.trim = function(str) {};
19632006
* @param {*} obj
19642007
* @return {string}
19652008
* @nosideeffects
2009+
* @deprecated
19662010
*/
19672011
jQuery.type = function(obj) {};
19682012

0 commit comments

Comments
 (0)