.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-html / jquery.d.ts
1 // Type definitions for jQuery 1.10.x / 2.0.x
2 // Project: http://jquery.com/
3 // Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christian Hoffmeister <https://github.com/choffmeister>, Steve Fenton <https://github.com/Steve-Fenton>, Diullei Gomes <https://github.com/Diullei>, Tass Iliopoulos <https://github.com/tasoili>, Jason Swearingen <https://github.com/jasons-novaleaf>, Sean Hill <https://github.com/seanski>, Guus Goossens <https://github.com/Guuz>, Kelly Summerlin <https://github.com/ksummerlin>, Basarat Ali Syed <https://github.com/basarat>, Nicholas Wolverson <https://github.com/nwolverson>, Derek Cicerone <https://github.com/derekcicerone>, Andrew Gaspar <https://github.com/AndrewGaspar>, James Harrison Fisher <https://github.com/jameshfisher>, Seikichi Kondo <https://github.com/seikichi>, Benjamin Jackman <https://github.com/benjaminjackman>, Poul Sorensen <https://github.com/s093294>, Josh Strobl <https://github.com/JoshStrobl>, John Reilly <https://github.com/johnnyreilly/>, Dick van den Brink <https://github.com/DickvdBrink>
4 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6 /* *****************************************************************************
7 Copyright (c) Microsoft Corporation. All rights reserved.
8 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
9 this file except in compliance with the License. You may obtain a copy of the
10 License at http://www.apache.org/licenses/LICENSE-2.0
11
12 THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
14 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
15 MERCHANTABLITY OR NON-INFRINGEMENT.
16
17 See the Apache Version 2.0 License for specific language governing permissions
18 and limitations under the License.
19 ***************************************************************************** */
20
21
22 /**
23  * Interface for the AJAX setting that will configure the AJAX request
24  */
25 interface JQueryAjaxSettings {
26     /**
27      * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
28      */
29     accepts?: any;
30     /**
31      * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().
32      */
33     async?: boolean;
34     /**
35      * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request.
36      */
37     beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any;
38     /**
39      * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.
40      */
41     cache?: boolean;
42     /**
43      * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
44      */
45     complete? (jqXHR: JQueryXHR, textStatus: string): any;
46     /**
47      * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5)
48      */
49     contents?: { [key: string]: any; };
50     //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
51     // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/742
52     /**
53      * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding.
54      */
55     contentType?: any;
56     /**
57      * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax).
58      */
59     context?: any;
60     /**
61      * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5)
62      */
63     converters?: { [key: string]: any; };
64     /**
65      * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5)
66      */
67     crossDomain?: boolean;
68     /**
69      * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below).
70      */
71     data?: any;
72     /**
73      * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter.
74      */
75     dataFilter? (data: any, ty: any): any;
76     /**
77      * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). 
78      */
79     dataType?: string;
80     /**
81      * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.
82      */
83     error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any;
84     /**
85      * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.
86      */
87     global?: boolean;
88     /**
89      * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5)
90      */
91     headers?: { [key: string]: any; };
92     /**
93      * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data.
94      */
95     ifModified?: boolean;
96     /**
97      * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1)
98      */
99     isLocal?: boolean;
100     /**
101      * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
102      */
103     jsonp?: any;
104     /**
105      * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function.
106      */
107     jsonpCallback?: any;
108     /**
109      * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0)
110      */
111     method?: string;
112     /**
113      * A mime type to override the XHR mime type. (version added: 1.5.1)
114      */
115     mimeType?: string;
116     /**
117      * A password to be used with XMLHttpRequest in response to an HTTP access authentication request.
118      */
119     password?: string;
120     /**
121      * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.
122      */
123     processData?: boolean;
124     /**
125      * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script.
126      */
127     scriptCharset?: string;
128     /**
129      * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5)
130      */
131     statusCode?: { [key: string]: any; };
132     /**
133      * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
134      */
135     success? (data: any, textStatus: string, jqXHR: JQueryXHR): any;
136     /**
137      * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.
138      */
139     timeout?: number;
140     /**
141      * Set this to true if you wish to use the traditional style of param serialization.
142      */
143     traditional?: boolean;
144     /**
145      * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.
146      */
147     type?: string;
148     /**
149      * A string containing the URL to which the request is sent.
150      */
151     url?: string;
152     /**
153      * A username to be used with XMLHttpRequest in response to an HTTP access authentication request.
154      */
155     username?: string;
156     /**
157      * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory.
158      */
159     xhr?: any;
160     /**
161      * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1)
162      */
163     xhrFields?: { [key: string]: any; };
164 }
165
166 /**
167  * Interface for the jqXHR object
168  */
169 interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
170     /**
171      * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). 
172      */
173     overrideMimeType(mimeType: string): any;
174     /**
175      * Cancel the request. 
176      *
177      * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled"
178      */
179     abort(statusText?: string): void;
180     /**
181      * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details.
182      */
183     then<R>(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => R, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<R>;
184     /**
185      * Property containing the parsed response if the response Content-Type is json
186      */
187     responseJSON?: any;
188     /**
189      * A function to be called if the request fails.
190      */
191     error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void;
192 }
193
194 /**
195  * Interface for the JQuery callback
196  */
197 interface JQueryCallback {
198     /**
199      * Add a callback or a collection of callbacks to a callback list.
200      * 
201      * @param callbacks A function, or array of functions, that are to be added to the callback list.
202      */
203     add(callbacks: Function): JQueryCallback;
204     /**
205      * Add a callback or a collection of callbacks to a callback list.
206      * 
207      * @param callbacks A function, or array of functions, that are to be added to the callback list.
208      */
209     add(callbacks: Function[]): JQueryCallback;
210
211     /**
212      * Disable a callback list from doing anything more.
213      */
214     disable(): JQueryCallback;
215
216     /**
217      * Determine if the callbacks list has been disabled.
218      */
219     disabled(): boolean;
220
221     /**
222      * Remove all of the callbacks from a list.
223      */
224     empty(): JQueryCallback;
225
226     /**
227      * Call all of the callbacks with the given arguments
228      * 
229      * @param arguments The argument or list of arguments to pass back to the callback list.
230      */
231     fire(...arguments: any[]): JQueryCallback;
232
233     /**
234      * Determine if the callbacks have already been called at least once.
235      */
236     fired(): boolean;
237
238     /**
239      * Call all callbacks in a list with the given context and arguments.
240      * 
241      * @param context A reference to the context in which the callbacks in the list should be fired.
242      * @param arguments An argument, or array of arguments, to pass to the callbacks in the list.
243      */
244     fireWith(context?: any, args?: any[]): JQueryCallback;
245
246     /**
247      * Determine whether a supplied callback is in a list
248      * 
249      * @param callback The callback to search for.
250      */
251     has(callback: Function): boolean;
252
253     /**
254      * Lock a callback list in its current state.
255      */
256     lock(): JQueryCallback;
257
258     /**
259      * Determine if the callbacks list has been locked.
260      */
261     locked(): boolean;
262
263     /**
264      * Remove a callback or a collection of callbacks from a callback list.
265      * 
266      * @param callbacks A function, or array of functions, that are to be removed from the callback list.
267      */
268     remove(callbacks: Function): JQueryCallback;
269     /**
270      * Remove a callback or a collection of callbacks from a callback list.
271      * 
272      * @param callbacks A function, or array of functions, that are to be removed from the callback list.
273      */
274     remove(callbacks: Function[]): JQueryCallback;
275 }
276
277 /**
278  * Allows jQuery Promises to interop with non-jQuery promises
279  */
280 interface JQueryGenericPromise<T> {
281     /**
282      * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
283      * 
284      * @param doneFilter A function that is called when the Deferred is resolved.
285      * @param failFilter An optional function that is called when the Deferred is rejected.
286      */
287     then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
288
289     /**
290      * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
291      * 
292      * @param doneFilter A function that is called when the Deferred is resolved.
293      * @param failFilter An optional function that is called when the Deferred is rejected.
294      */
295     then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
296 }
297
298 /**
299  * Interface for the JQuery promise/deferred callbacks
300  */
301 interface JQueryPromiseCallback<T> {
302     (value?: T, ...args: any[]): void;
303 }
304
305 interface JQueryPromiseOperator<T, U> {
306     (callback1: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...callbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<U>;
307 }
308
309 /**
310  * Interface for the JQuery promise, part of callbacks
311  */
312 interface JQueryPromise<T> extends JQueryGenericPromise<T> {
313     /**
314      * Determine the current state of a Deferred object.
315      */
316     state(): string;
317     /**
318      * Add handlers to be called when the Deferred object is either resolved or rejected.
319      * 
320      * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
321      * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
322      */
323     always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
324     /**
325      * Add handlers to be called when the Deferred object is resolved.
326      * 
327      * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
328      * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
329      */
330     done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryPromise<T>;
331     /**
332      * Add handlers to be called when the Deferred object is rejected.
333      * 
334      * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
335      * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
336      */
337     fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
338     /**
339      * Add handlers to be called when the Deferred object generates progress notifications.
340      * 
341      * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
342      */
343     progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
344
345     // Deprecated - given no typings
346     pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
347     
348     /**
349      * Return a Deferred's Promise object.
350      * 
351      * @param target Object onto which the promise methods have to be attached
352      */
353     promise(target?: any): JQueryPromise<T>;
354 }
355
356 /**
357  * Interface for the JQuery deferred, part of callbacks
358  */
359 interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
360     /**
361      * Determine the current state of a Deferred object.
362      */
363     state(): string;
364     /**
365      * Add handlers to be called when the Deferred object is either resolved or rejected.
366      * 
367      * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
368      * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
369      */
370     always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
371     /**
372      * Add handlers to be called when the Deferred object is resolved.
373      * 
374      * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
375      * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
376      */
377     done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryDeferred<T>;
378     /**
379      * Add handlers to be called when the Deferred object is rejected.
380      * 
381      * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
382      * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
383      */
384     fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
385     /**
386      * Add handlers to be called when the Deferred object generates progress notifications.
387      * 
388      * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
389      */
390     progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
391
392     /**
393      * Call the progressCallbacks on a Deferred object with the given args.
394      * 
395      * @param args Optional arguments that are passed to the progressCallbacks.
396      */
397     notify(value?: any, ...args: any[]): JQueryDeferred<T>;
398
399     /**
400      * Call the progressCallbacks on a Deferred object with the given context and args.
401      * 
402      * @param context Context passed to the progressCallbacks as the this object.
403      * @param args Optional arguments that are passed to the progressCallbacks.
404      */
405     notifyWith(context: any, value?: any[]): JQueryDeferred<T>;
406
407     /**
408      * Reject a Deferred object and call any failCallbacks with the given args.
409      * 
410      * @param args Optional arguments that are passed to the failCallbacks.
411      */
412     reject(value?: any, ...args: any[]): JQueryDeferred<T>;
413     /**
414      * Reject a Deferred object and call any failCallbacks with the given context and args.
415      * 
416      * @param context Context passed to the failCallbacks as the this object.
417      * @param args An optional array of arguments that are passed to the failCallbacks.
418      */
419     rejectWith(context: any, value?: any[]): JQueryDeferred<T>;
420
421     /**
422      * Resolve a Deferred object and call any doneCallbacks with the given args.
423      * 
424      * @param value First argument passed to doneCallbacks.
425      * @param args Optional subsequent arguments that are passed to the doneCallbacks.
426      */
427     resolve(value?: T, ...args: any[]): JQueryDeferred<T>;
428
429     /**
430      * Resolve a Deferred object and call any doneCallbacks with the given context and args.
431      * 
432      * @param context Context passed to the doneCallbacks as the this object.
433      * @param args An optional array of arguments that are passed to the doneCallbacks.
434      */
435     resolveWith(context: any, value?: T[]): JQueryDeferred<T>;
436
437     /**
438      * Return a Deferred's Promise object.
439      * 
440      * @param target Object onto which the promise methods have to be attached
441      */
442     promise(target?: any): JQueryPromise<T>;
443
444     // Deprecated - given no typings
445     pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
446 }
447
448 /**
449  * Interface of the JQuery extension of the W3C event object
450  */
451 interface BaseJQueryEventObject extends Event {
452     currentTarget: Element;
453     data: any;
454     delegateTarget: Element;
455     isDefaultPrevented(): boolean;
456     isImmediatePropagationStopped(): boolean;
457     isPropagationStopped(): boolean;
458     namespace: string;
459     originalEvent: Event;
460     preventDefault(): any;
461     relatedTarget: Element;
462     result: any;
463     stopImmediatePropagation(): void;
464     stopPropagation(): void;
465     target: Element;
466     pageX: number;
467     pageY: number;
468     which: number;
469     metaKey: boolean;
470 }
471
472 interface JQueryInputEventObject extends BaseJQueryEventObject {
473     altKey: boolean;
474     ctrlKey: boolean;
475     metaKey: boolean;
476     shiftKey: boolean;
477 }
478
479 interface JQueryMouseEventObject extends JQueryInputEventObject {
480     button: number;
481     clientX: number;
482     clientY: number;
483     offsetX: number;
484     offsetY: number;
485     pageX: number;
486     pageY: number;
487     screenX: number;
488     screenY: number;
489 }
490
491 interface JQueryKeyEventObject extends JQueryInputEventObject {
492     char: any;
493     charCode: number;
494     key: any;
495     keyCode: number;
496 }
497
498 interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{
499 }
500
501 /*
502     Collection of properties of the current browser
503 */
504
505 interface JQuerySupport {
506     ajax?: boolean;
507     boxModel?: boolean;
508     changeBubbles?: boolean;
509     checkClone?: boolean;
510     checkOn?: boolean;
511     cors?: boolean;
512     cssFloat?: boolean;
513     hrefNormalized?: boolean;
514     htmlSerialize?: boolean;
515     leadingWhitespace?: boolean;
516     noCloneChecked?: boolean;
517     noCloneEvent?: boolean;
518     opacity?: boolean;
519     optDisabled?: boolean;
520     optSelected?: boolean;
521     scriptEval? (): boolean;
522     style?: boolean;
523     submitBubbles?: boolean;
524     tbody?: boolean;
525 }
526
527 interface JQueryParam {
528     /**
529      * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
530      * 
531      * @param obj An array or object to serialize.
532      */
533     (obj: any): string;
534
535     /**
536      * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
537      * 
538      * @param obj An array or object to serialize.
539      * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
540      */
541     (obj: any, traditional: boolean): string;
542 }
543
544 /**
545  * The interface used to construct jQuery events (with $.Event). It is
546  * defined separately instead of inline in JQueryStatic to allow
547  * overriding the construction function with specific strings
548  * returning specific event objects.
549  */
550 interface JQueryEventConstructor {
551     (name: string, eventProperties?: any): JQueryEventObject;
552     new (name: string, eventProperties?: any): JQueryEventObject;
553 }
554
555 /**
556  * The interface used to specify coordinates.
557  */
558 interface JQueryCoordinates {
559     left: number;
560     top: number;
561 }
562
563 /**
564  * Elements in the array returned by serializeArray()
565  */
566 interface JQuerySerializeArrayElement {
567     name: string;
568     value: string;
569 }
570
571 interface JQueryAnimationOptions { 
572     /**
573      * A string or number determining how long the animation will run.
574      */
575     duration?: any; 
576     /**
577      * A string indicating which easing function to use for the transition.
578      */
579     easing?: string; 
580     /**
581      * A function to call once the animation is complete.
582      */
583     complete?: Function; 
584     /**
585      * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set.
586      */
587     step?: (now: number, tween: any) => any; 
588     /**
589      * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8)
590      */
591     progress?: (animation: JQueryPromise<any>, progress: number, remainingMs: number) => any; 
592     /**
593      * A function to call when the animation begins. (version added: 1.8)
594      */
595     start?: (animation: JQueryPromise<any>) => any; 
596     /**
597      * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)
598      */
599     done?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any; 
600     /**
601      * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8)
602      */
603     fail?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any; 
604     /**
605      * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8)
606      */
607     always?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any; 
608     /**
609      * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it.
610      */
611     queue?: any; 
612     /**
613      * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4)
614      */
615     specialEasing?: Object;
616 }
617
618 interface JQueryEasingFunction {
619     ( percent: number ): number;
620 }
621
622 interface JQueryEasingFunctions {
623     [ name: string ]: JQueryEasingFunction;
624     linear: JQueryEasingFunction;
625     swing: JQueryEasingFunction;
626 }
627
628 /**
629  * Static members of jQuery (those on $ and jQuery themselves)
630  */
631 interface JQueryStatic {
632
633     /**
634      * Perform an asynchronous HTTP (Ajax) request.
635      *
636      * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
637      */
638     ajax(settings: JQueryAjaxSettings): JQueryXHR;
639     /**
640      * Perform an asynchronous HTTP (Ajax) request.
641      *
642      * @param url A string containing the URL to which the request is sent.
643      * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
644      */
645     ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
646
647     /**
648      * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
649      *
650      * @param dataTypes An optional string containing one or more space-separated dataTypes
651      * @param handler A handler to set default values for future Ajax requests.
652      */
653     ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
654     /**
655      * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
656      *
657      * @param handler A handler to set default values for future Ajax requests.
658      */
659     ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
660
661     ajaxSettings: JQueryAjaxSettings;
662
663      /**
664       * Set default values for future Ajax requests. Its use is not recommended.
665       *
666       * @param options A set of key/value pairs that configure the default Ajax request. All options are optional.
667       */
668     ajaxSetup(options: JQueryAjaxSettings): void;
669
670     /**
671      * Load data from the server using a HTTP GET request.
672      *
673      * @param url A string containing the URL to which the request is sent.
674      * @param success A callback function that is executed if the request succeeds.
675      * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
676      */
677     get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
678     /**
679      * Load data from the server using a HTTP GET request.
680      *
681      * @param url A string containing the URL to which the request is sent.
682      * @param data A plain object or string that is sent to the server with the request.
683      * @param success A callback function that is executed if the request succeeds.
684      * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
685      */
686     get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
687     /**
688      * Load data from the server using a HTTP GET request.
689      *
690      * @param settings The JQueryAjaxSettings to be used for the request
691      */
692     get(settings : JQueryAjaxSettings): JQueryXHR;
693     /**
694      * Load JSON-encoded data from the server using a GET HTTP request.
695      *
696      * @param url A string containing the URL to which the request is sent.
697      * @param success A callback function that is executed if the request succeeds.
698      */
699     getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
700     /**
701      * Load JSON-encoded data from the server using a GET HTTP request.
702      *
703      * @param url A string containing the URL to which the request is sent.
704      * @param data A plain object or string that is sent to the server with the request.
705      * @param success A callback function that is executed if the request succeeds.
706      */
707     getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
708     /**
709      * Load a JavaScript file from the server using a GET HTTP request, then execute it.
710      *
711      * @param url A string containing the URL to which the request is sent.
712      * @param success A callback function that is executed if the request succeeds.
713      */
714     getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
715
716     /**
717      * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
718      */
719     param: JQueryParam;
720
721     /**
722      * Load data from the server using a HTTP POST request.
723      *
724      * @param url A string containing the URL to which the request is sent.
725      * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
726      * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
727      */
728     post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
729     /**
730      * Load data from the server using a HTTP POST request.
731      *
732      * @param url A string containing the URL to which the request is sent.
733      * @param data A plain object or string that is sent to the server with the request.
734      * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
735      * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
736      */
737     post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
738     /**
739      * Load data from the server using a HTTP POST request.
740      *
741      * @param settings The JQueryAjaxSettings to be used for the request
742      */
743     post(settings : JQueryAjaxSettings): JQueryXHR;
744     /**
745      * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
746      *
747      * @param flags An optional list of space-separated flags that change how the callback list behaves.
748      */
749     Callbacks(flags?: string): JQueryCallback;
750
751     /**
752      * Holds or releases the execution of jQuery's ready event.
753      *
754      * @param hold Indicates whether the ready hold is being requested or released
755      */
756     holdReady(hold: boolean): void;
757
758     /**
759      * Accepts a string containing a CSS selector which is then used to match a set of elements.
760      *
761      * @param selector A string containing a selector expression
762      * @param context A DOM Element, Document, or jQuery to use as context
763      */
764     (selector: string, context?: Element|JQuery): JQuery;
765
766     /**
767      * Accepts a string containing a CSS selector which is then used to match a set of elements.
768      *
769      * @param element A DOM element to wrap in a jQuery object.
770      */
771     (element: Element): JQuery;
772
773     /**
774      * Accepts a string containing a CSS selector which is then used to match a set of elements.
775      *
776      * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
777      */
778     (elementArray: Element[]): JQuery;
779
780     /**
781      * Binds a function to be executed when the DOM has finished loading.
782      *
783      * @param callback A function to execute after the DOM is ready.
784      */
785     (callback: (jQueryAlias?: JQueryStatic) => any): JQuery;
786
787     /**
788      * Accepts a string containing a CSS selector which is then used to match a set of elements.
789      *
790      * @param object A plain object to wrap in a jQuery object.
791      */
792     (object: {}): JQuery;
793
794     /**
795      * Accepts a string containing a CSS selector which is then used to match a set of elements.
796      *
797      * @param object An existing jQuery object to clone.
798      */
799     (object: JQuery): JQuery;
800
801     /**
802      * Specify a function to execute when the DOM is fully loaded.
803      */
804     (): JQuery;
805
806     /**
807      * Creates DOM elements on the fly from the provided string of raw HTML.
808      *
809      * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML.
810      * @param ownerDocument A document in which the new elements will be created.
811      */
812     (html: string, ownerDocument?: Document): JQuery;
813
814     /**
815      * Creates DOM elements on the fly from the provided string of raw HTML.
816      *
817      * @param html A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).
818      * @param attributes An object of attributes, events, and methods to call on the newly-created element.
819      */
820     (html: string, attributes: Object): JQuery;
821
822     /**
823      * Relinquish jQuery's control of the $ variable.
824      *
825      * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
826      */
827     noConflict(removeAll?: boolean): JQueryStatic;
828
829     /**
830      * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
831      *
832      * @param deferreds One or more Deferred objects, or plain JavaScript objects.
833      */
834     when<T>(...deferreds: Array<T|JQueryPromise<T>/* as JQueryDeferred<T> */>): JQueryPromise<T>;
835
836     /**
837      * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
838      */
839     cssHooks: { [key: string]: any; };
840     cssNumber: any;
841
842     /**
843      * Store arbitrary data associated with the specified element. Returns the value that was set.
844      *
845      * @param element The DOM element to associate with the data.
846      * @param key A string naming the piece of data to set.
847      * @param value The new data value.
848      */
849     data<T>(element: Element, key: string, value: T): T;
850     /**
851      * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
852      *
853      * @param element The DOM element to associate with the data.
854      * @param key A string naming the piece of data to set.
855      */
856     data(element: Element, key: string): any;
857     /**
858      * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
859      *
860      * @param element The DOM element to associate with the data.
861      */
862     data(element: Element): any;
863
864     /**
865      * Execute the next function on the queue for the matched element.
866      *
867      * @param element A DOM element from which to remove and execute a queued function.
868      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
869      */
870     dequeue(element: Element, queueName?: string): void;
871
872     /**
873      * Determine whether an element has any jQuery data associated with it.
874      *
875      * @param element A DOM element to be checked for data.
876      */
877     hasData(element: Element): boolean;
878
879     /**
880      * Show the queue of functions to be executed on the matched element.
881      *
882      * @param element A DOM element to inspect for an attached queue.
883      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
884      */
885     queue(element: Element, queueName?: string): any[];
886     /**
887      * Manipulate the queue of functions to be executed on the matched element.
888      *
889      * @param element A DOM element where the array of queued functions is attached.
890      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
891      * @param newQueue An array of functions to replace the current queue contents.
892      */
893     queue(element: Element, queueName: string, newQueue: Function[]): JQuery;
894     /**
895      * Manipulate the queue of functions to be executed on the matched element.
896      *
897      * @param element A DOM element on which to add a queued function.
898      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
899      * @param callback The new function to add to the queue.
900      */
901     queue(element: Element, queueName: string, callback: Function): JQuery;
902
903     /**
904      * Remove a previously-stored piece of data.
905      *
906      * @param element A DOM element from which to remove data.
907      * @param name A string naming the piece of data to remove.
908      */
909     removeData(element: Element, name?: string): JQuery;
910
911     /**
912      * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
913      *
914      * @param beforeStart A function that is called just before the constructor returns.
915      */
916     Deferred<T>(beforeStart?: (deferred: JQueryDeferred<T>) => any): JQueryDeferred<T>;
917
918     /**
919      * Effects
920      */
921
922     easing: JQueryEasingFunctions;
923
924     fx: {
925         tick: () => void;
926         /**
927          * The rate (in milliseconds) at which animations fire.
928          */
929         interval: number;
930         stop: () => void;
931         speeds: { slow: number; fast: number; };
932         /**
933          * Globally disable all animations.
934          */
935         off: boolean;
936         step: any;
937     };
938
939     /**
940      * Takes a function and returns a new one that will always have a particular context.
941      *
942      * @param fnction The function whose context will be changed.
943      * @param context The object to which the context (this) of the function should be set.
944      * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument.
945      */
946     proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any;
947     /**
948      * Takes a function and returns a new one that will always have a particular context.
949      *
950      * @param context The object to which the context (this) of the function should be set.
951      * @param name The name of the function whose context will be changed (should be a property of the context object).
952      * @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
953      */
954     proxy(context: Object, name: string, ...additionalArguments: any[]): any;
955
956     Event: JQueryEventConstructor;
957
958     /**
959      * Takes a string and throws an exception containing it.
960      *
961      * @param message The message to send out.
962      */
963     error(message: any): JQuery;
964
965     expr: any;
966     fn: any;  //TODO: Decide how we want to type this
967
968     isReady: boolean;
969
970     // Properties
971     support: JQuerySupport;
972
973     /**
974      * Check to see if a DOM element is a descendant of another DOM element.
975      * 
976      * @param container The DOM element that may contain the other element.
977      * @param contained The DOM element that may be contained by (a descendant of) the other element.
978      */
979     contains(container: Element, contained: Element): boolean;
980
981     /**
982      * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
983      * 
984      * @param collection The object or array to iterate over.
985      * @param callback The function that will be executed on every object.
986      */
987     each<T>(
988         collection: T[],
989         callback: (indexInArray: number, valueOfElement: T) => any
990         ): any;
991
992     /**
993      * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
994      * 
995      * @param collection The object or array to iterate over.
996      * @param callback The function that will be executed on every object.
997      */
998     each(
999         collection: any,
1000         callback: (indexInArray: any, valueOfElement: any) => any
1001         ): any;
1002
1003     /**
1004      * Merge the contents of two or more objects together into the first object.
1005      *
1006      * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.
1007      * @param object1 An object containing additional properties to merge in.
1008      * @param objectN Additional objects containing properties to merge in.
1009      */
1010     extend(target: any, object1?: any, ...objectN: any[]): any;
1011     /**
1012      * Merge the contents of two or more objects together into the first object.
1013      *
1014      * @param deep If true, the merge becomes recursive (aka. deep copy).
1015      * @param target The object to extend. It will receive the new properties.
1016      * @param object1 An object containing additional properties to merge in.
1017      * @param objectN Additional objects containing properties to merge in.
1018      */
1019     extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
1020
1021     /**
1022      * Execute some JavaScript code globally.
1023      *
1024      * @param code The JavaScript code to execute.
1025      */
1026     globalEval(code: string): any;
1027
1028     /**
1029      * Finds the elements of an array which satisfy a filter function. The original array is not affected.
1030      *
1031      * @param array The array to search through.
1032      * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value.  this will be the global window object.
1033      * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false.
1034      */
1035     grep<T>(array: T[], func: (elementOfArray?: T, indexInArray?: number) => boolean, invert?: boolean): T[];
1036
1037     /**
1038      * Search for a specified value within an array and return its index (or -1 if not found).
1039      *
1040      * @param value The value to search for.
1041      * @param array An array through which to search.
1042      * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array.
1043      */
1044     inArray<T>(value: T, array: T[], fromIndex?: number): number;
1045
1046     /**
1047      * Determine whether the argument is an array.
1048      *
1049      * @param obj Object to test whether or not it is an array.
1050      */
1051     isArray(obj: any): boolean;
1052     /**
1053      * Check to see if an object is empty (contains no enumerable properties).
1054      *
1055      * @param obj The object that will be checked to see if it's empty.
1056      */
1057     isEmptyObject(obj: any): boolean;
1058     /**
1059      * Determine if the argument passed is a Javascript function object.
1060      *
1061      * @param obj Object to test whether or not it is a function.
1062      */
1063     isFunction(obj: any): boolean;
1064     /**
1065      * Determines whether its argument is a number.
1066      *
1067      * @param obj The value to be tested.
1068      */
1069     isNumeric(value: any): boolean;
1070     /**
1071      * Check to see if an object is a plain object (created using "{}" or "new Object").
1072      *
1073      * @param obj The object that will be checked to see if it's a plain object.
1074      */
1075     isPlainObject(obj: any): boolean;
1076     /**
1077      * Determine whether the argument is a window.
1078      *
1079      * @param obj Object to test whether or not it is a window.
1080      */
1081     isWindow(obj: any): boolean;
1082     /**
1083      * Check to see if a DOM node is within an XML document (or is an XML document).
1084      *
1085      * @param node he DOM node that will be checked to see if it's in an XML document.
1086      */
1087     isXMLDoc(node: Node): boolean;
1088
1089     /**
1090      * Convert an array-like object into a true JavaScript array.
1091      * 
1092      * @param obj Any object to turn into a native Array.
1093      */
1094     makeArray(obj: any): any[];
1095
1096     /**
1097      * Translate all items in an array or object to new array of items.
1098      * 
1099      * @param array The Array to translate.
1100      * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
1101      */
1102     map<T, U>(array: T[], callback: (elementOfArray?: T, indexInArray?: number) => U): U[];
1103     /**
1104      * Translate all items in an array or object to new array of items.
1105      * 
1106      * @param arrayOrObject The Array or Object to translate.
1107      * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.
1108      */
1109     map(arrayOrObject: any, callback: (value?: any, indexOrKey?: any) => any): any;
1110
1111     /**
1112      * Merge the contents of two arrays together into the first array.
1113      * 
1114      * @param first The first array to merge, the elements of second added.
1115      * @param second The second array to merge into the first, unaltered.
1116      */
1117     merge<T>(first: T[], second: T[]): T[];
1118
1119     /**
1120      * An empty function.
1121      */
1122     noop(): any;
1123
1124     /**
1125      * Return a number representing the current time.
1126      */
1127     now(): number;
1128
1129     /**
1130      * Takes a well-formed JSON string and returns the resulting JavaScript object.
1131      * 
1132      * @param json The JSON string to parse.
1133      */
1134     parseJSON(json: string): any;
1135
1136     /**
1137      * Parses a string into an XML document.
1138      *
1139      * @param data a well-formed XML string to be parsed
1140      */
1141     parseXML(data: string): XMLDocument;
1142
1143     /**
1144      * Remove the whitespace from the beginning and end of a string.
1145      * 
1146      * @param str Remove the whitespace from the beginning and end of a string.
1147      */
1148     trim(str: string): string;
1149
1150     /**
1151      * Determine the internal JavaScript [[Class]] of an object.
1152      * 
1153      * @param obj Object to get the internal JavaScript [[Class]] of.
1154      */
1155     type(obj: any): string;
1156
1157     /**
1158      * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
1159      * 
1160      * @param array The Array of DOM elements.
1161      */
1162     unique(array: Element[]): Element[];
1163
1164     /**
1165      * Parses a string into an array of DOM nodes.
1166      *
1167      * @param data HTML string to be parsed
1168      * @param context DOM element to serve as the context in which the HTML fragment will be created
1169      * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1170      */
1171     parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
1172
1173     /**
1174      * Parses a string into an array of DOM nodes.
1175      *
1176      * @param data HTML string to be parsed
1177      * @param context DOM element to serve as the context in which the HTML fragment will be created
1178      * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1179      */
1180     parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
1181 }
1182
1183 /**
1184  * The jQuery instance members
1185  */
1186 interface JQuery {
1187     /**
1188      * Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
1189      *
1190      * @param handler The function to be invoked.
1191      */
1192     ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery;
1193     /**
1194      * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
1195      *
1196      * @param handler The function to be invoked.
1197      */
1198     ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery;
1199     /**
1200      * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
1201      *
1202      * @param handler The function to be invoked.
1203      */
1204     ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1205     /**
1206      * Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
1207      *
1208      * @param handler The function to be invoked.
1209      */
1210     ajaxStart(handler: () => any): JQuery;
1211     /**
1212      * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
1213      *
1214      * @param handler The function to be invoked.
1215      */
1216     ajaxStop(handler: () => any): JQuery;
1217     /**
1218      * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
1219      *
1220      * @param handler The function to be invoked.
1221      */
1222     ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1223
1224     /**
1225      * Load data from the server and place the returned HTML into the matched element.
1226      *
1227      * @param url A string containing the URL to which the request is sent.
1228      * @param data A plain object or string that is sent to the server with the request.
1229      * @param complete A callback function that is executed when the request completes.
1230      */
1231     load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery;
1232
1233     /**
1234      * Encode a set of form elements as a string for submission.
1235      */
1236     serialize(): string;
1237     /**
1238      * Encode a set of form elements as an array of names and values.
1239      */
1240     serializeArray(): JQuerySerializeArrayElement[];
1241
1242     /**
1243      * Adds the specified class(es) to each of the set of matched elements.
1244      *
1245      * @param className One or more space-separated classes to be added to the class attribute of each matched element.
1246      */
1247     addClass(className: string): JQuery;
1248     /**
1249      * Adds the specified class(es) to each of the set of matched elements.
1250      *
1251      * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.
1252      */
1253     addClass(func: (index: number, className: string) => string): JQuery;
1254
1255     /**
1256      * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
1257      */
1258     addBack(selector?: string): JQuery;
1259
1260     /**
1261      * Get the value of an attribute for the first element in the set of matched elements.
1262      *
1263      * @param attributeName The name of the attribute to get.
1264      */
1265     attr(attributeName: string): string;
1266     /**
1267      * Set one or more attributes for the set of matched elements.
1268      *
1269      * @param attributeName The name of the attribute to set.
1270      * @param value A value to set for the attribute.
1271      */
1272     attr(attributeName: string, value: string|number): JQuery;
1273     /**
1274      * Set one or more attributes for the set of matched elements.
1275      *
1276      * @param attributeName The name of the attribute to set.
1277      * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.
1278      */
1279     attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery;
1280     /**
1281      * Set one or more attributes for the set of matched elements.
1282      *
1283      * @param attributes An object of attribute-value pairs to set.
1284      */
1285     attr(attributes: Object): JQuery;
1286     
1287     /**
1288      * Determine whether any of the matched elements are assigned the given class.
1289      *
1290      * @param className The class name to search for.
1291      */
1292     hasClass(className: string): boolean;
1293
1294     /**
1295      * Get the HTML contents of the first element in the set of matched elements.
1296      */
1297     html(): string;
1298     /**
1299      * Set the HTML contents of each element in the set of matched elements.
1300      *
1301      * @param htmlString A string of HTML to set as the content of each matched element.
1302      */
1303     html(htmlString: string): JQuery;
1304     /**
1305      * Set the HTML contents of each element in the set of matched elements.
1306      *
1307      * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
1308      */
1309     html(func: (index: number, oldhtml: string) => string): JQuery;
1310     /**
1311      * Set the HTML contents of each element in the set of matched elements.
1312      *
1313      * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
1314      */
1315
1316     /**
1317      * Get the value of a property for the first element in the set of matched elements.
1318      *
1319      * @param propertyName The name of the property to get.
1320      */
1321     prop(propertyName: string): any;
1322     /**
1323      * Set one or more properties for the set of matched elements.
1324      *
1325      * @param propertyName The name of the property to set.
1326      * @param value A value to set for the property.
1327      */
1328     prop(propertyName: string, value: string|number|boolean): JQuery;
1329     /**
1330      * Set one or more properties for the set of matched elements.
1331      *
1332      * @param properties An object of property-value pairs to set.
1333      */
1334     prop(properties: Object): JQuery;
1335     /**
1336      * Set one or more properties for the set of matched elements.
1337      *
1338      * @param propertyName The name of the property to set.
1339      * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.
1340      */
1341     prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery;
1342
1343     /**
1344      * Remove an attribute from each element in the set of matched elements.
1345      *
1346      * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
1347      */
1348     removeAttr(attributeName: string): JQuery;
1349
1350     /**
1351      * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1352      *
1353      * @param className One or more space-separated classes to be removed from the class attribute of each matched element.
1354      */
1355     removeClass(className?: string): JQuery;
1356     /**
1357      * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1358      *
1359      * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.
1360      */
1361     removeClass(func: (index: number, className: string) => string): JQuery;
1362
1363     /**
1364      * Remove a property for the set of matched elements.
1365      *
1366      * @param propertyName The name of the property to remove.
1367      */
1368     removeProp(propertyName: string): JQuery;
1369
1370     /**
1371      * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
1372      *
1373      * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set.
1374      * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
1375      */
1376     toggleClass(className: string, swtch?: boolean): JQuery;
1377     /**
1378      * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
1379      *
1380      * @param swtch A boolean value to determine whether the class should be added or removed.
1381      */
1382     toggleClass(swtch?: boolean): JQuery;
1383     /**
1384      * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
1385      *
1386      * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.
1387      * @param swtch A boolean value to determine whether the class should be added or removed.
1388      */
1389     toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery;
1390
1391     /**
1392      * Get the current value of the first element in the set of matched elements.
1393      */
1394     val(): any;
1395     /**
1396      * Set the value of each element in the set of matched elements.
1397      *
1398      * @param value A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked.
1399      */
1400     val(value: string|string[]|number): JQuery;
1401     /**
1402      * Set the value of each element in the set of matched elements.
1403      *
1404      * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
1405      */
1406     val(func: (index: number, value: string) => string): JQuery;
1407
1408
1409     /**
1410      * Get the value of style properties for the first element in the set of matched elements.
1411      *
1412      * @param propertyName A CSS property.
1413      */
1414     css(propertyName: string): string;
1415     /**
1416      * Set one or more CSS properties for the set of matched elements.
1417      *
1418      * @param propertyName A CSS property name.
1419      * @param value A value to set for the property.
1420      */
1421     css(propertyName: string, value: string|number): JQuery;
1422     /**
1423      * Set one or more CSS properties for the set of matched elements.
1424      *
1425      * @param propertyName A CSS property name.
1426      * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
1427      */
1428     css(propertyName: string, value: (index: number, value: string) => string|number): JQuery;
1429     /**
1430      * Set one or more CSS properties for the set of matched elements.
1431      *
1432      * @param properties An object of property-value pairs to set.
1433      */
1434     css(properties: Object): JQuery;
1435
1436     /**
1437      * Get the current computed height for the first element in the set of matched elements.
1438      */
1439     height(): number;
1440     /**
1441      * Set the CSS height of every matched element.
1442      *
1443      * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
1444      */
1445     height(value: number|string): JQuery;
1446     /**
1447      * Set the CSS height of every matched element.
1448      *
1449      * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.
1450      */
1451     height(func: (index: number, height: number) => number|string): JQuery;
1452
1453     /**
1454      * Get the current computed height for the first element in the set of matched elements, including padding but not border.
1455      */
1456     innerHeight(): number;
1457
1458     /**
1459      * Sets the inner height on elements in the set of matched elements, including padding but not border.
1460      *
1461      * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1462      */
1463     innerHeight(height: number|string): JQuery;
1464     
1465     /**
1466      * Get the current computed width for the first element in the set of matched elements, including padding but not border.
1467      */
1468     innerWidth(): number;
1469
1470     /**
1471      * Sets the inner width on elements in the set of matched elements, including padding but not border.
1472      *
1473      * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1474      */
1475     innerWidth(width: number|string): JQuery;
1476     
1477     /**
1478      * Get the current coordinates of the first element in the set of matched elements, relative to the document.
1479      */
1480     offset(): JQueryCoordinates;
1481     /**
1482      * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1483      *
1484      * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1485      */
1486     offset(coordinates: JQueryCoordinates): JQuery;
1487     /**
1488      * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1489      *
1490      * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.
1491      */
1492     offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery;
1493
1494     /**
1495      * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements.
1496      *
1497      * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1498      */
1499     outerHeight(includeMargin?: boolean): number;
1500
1501     /**
1502      * Sets the outer height on elements in the set of matched elements, including padding and border.
1503      *
1504      * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1505      */
1506     outerHeight(height: number|string): JQuery;
1507
1508     /**
1509      * Get the current computed width for the first element in the set of matched elements, including padding and border.
1510      *
1511      * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1512      */
1513     outerWidth(includeMargin?: boolean): number;
1514
1515     /**
1516      * Sets the outer width on elements in the set of matched elements, including padding and border.
1517      *
1518      * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1519      */
1520     outerWidth(width: number|string): JQuery;
1521
1522     /**
1523      * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
1524      */
1525     position(): JQueryCoordinates;
1526
1527     /**
1528      * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.
1529      */
1530     scrollLeft(): number;
1531     /**
1532      * Set the current horizontal position of the scroll bar for each of the set of matched elements.
1533      *
1534      * @param value An integer indicating the new position to set the scroll bar to.
1535      */
1536     scrollLeft(value: number): JQuery;
1537
1538     /**
1539      * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.
1540      */
1541     scrollTop(): number;
1542     /**
1543      * Set the current vertical position of the scroll bar for each of the set of matched elements.
1544      *
1545      * @param value An integer indicating the new position to set the scroll bar to.
1546      */
1547     scrollTop(value: number): JQuery;
1548
1549     /**
1550      * Get the current computed width for the first element in the set of matched elements.
1551      */
1552     width(): number;
1553     /**
1554      * Set the CSS width of each element in the set of matched elements.
1555      *
1556      * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1557      */
1558     width(value: number|string): JQuery;
1559     /**
1560      * Set the CSS width of each element in the set of matched elements.
1561      *
1562      * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.
1563      */
1564     width(func: (index: number, width: number) => number|string): JQuery;
1565
1566     /**
1567      * Remove from the queue all items that have not yet been run.
1568      *
1569      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1570      */
1571     clearQueue(queueName?: string): JQuery;
1572
1573     /**
1574      * Store arbitrary data associated with the matched elements.
1575      *
1576      * @param key A string naming the piece of data to set.
1577      * @param value The new data value; it can be any Javascript type including Array or Object.
1578      */
1579     data(key: string, value: any): JQuery;
1580     /**
1581      * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
1582      *
1583      * @param key Name of the data stored.
1584      */
1585     data(key: string): any;
1586     /**
1587      * Store arbitrary data associated with the matched elements.
1588      *
1589      * @param obj An object of key-value pairs of data to update.
1590      */
1591     data(obj: { [key: string]: any; }): JQuery;
1592     /**
1593      * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
1594      */
1595     data(): any;
1596
1597     /**
1598      * Execute the next function on the queue for the matched elements.
1599      *
1600      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1601      */
1602     dequeue(queueName?: string): JQuery;
1603
1604     /**
1605      * Remove a previously-stored piece of data.
1606      *
1607      * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete.
1608      */
1609     removeData(name: string): JQuery;
1610     /**
1611      * Remove a previously-stored piece of data.
1612      *
1613      * @param list An array of strings naming the pieces of data to delete.
1614      */
1615     removeData(list: string[]): JQuery;
1616     /**
1617      * Remove all previously-stored piece of data.
1618      */
1619     removeData(): JQuery;
1620
1621     /**
1622      * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
1623      *
1624      * @param type The type of queue that needs to be observed. (default: fx)
1625      * @param target Object onto which the promise methods have to be attached
1626      */
1627     promise(type?: string, target?: Object): JQueryPromise<any>;
1628
1629     /**
1630      * Perform a custom animation of a set of CSS properties.
1631      *
1632      * @param properties An object of CSS properties and values that the animation will move toward.
1633      * @param duration A string or number determining how long the animation will run.
1634      * @param complete A function to call once the animation is complete.
1635      */
1636     animate(properties: Object, duration?: string|number, complete?: Function): JQuery;
1637     /**
1638      * Perform a custom animation of a set of CSS properties.
1639      *
1640      * @param properties An object of CSS properties and values that the animation will move toward.
1641      * @param duration A string or number determining how long the animation will run.
1642      * @param easing A string indicating which easing function to use for the transition. (default: swing)
1643      * @param complete A function to call once the animation is complete.
1644      */
1645     animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery;
1646     /**
1647      * Perform a custom animation of a set of CSS properties.
1648      *
1649      * @param properties An object of CSS properties and values that the animation will move toward.
1650      * @param options A map of additional options to pass to the method.
1651      */
1652     animate(properties: Object, options: JQueryAnimationOptions): JQuery;
1653
1654     /**
1655      * Set a timer to delay execution of subsequent items in the queue.
1656      *
1657      * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
1658      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1659      */
1660     delay(duration: number, queueName?: string): JQuery;
1661
1662     /**
1663      * Display the matched elements by fading them to opaque.
1664      *
1665      * @param duration A string or number determining how long the animation will run.
1666      * @param complete A function to call once the animation is complete.
1667      */
1668     fadeIn(duration?: number|string, complete?: Function): JQuery;
1669     /**
1670      * Display the matched elements by fading them to opaque.
1671      *
1672      * @param duration A string or number determining how long the animation will run.
1673      * @param easing A string indicating which easing function to use for the transition.
1674      * @param complete A function to call once the animation is complete.
1675      */
1676     fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery;
1677     /**
1678      * Display the matched elements by fading them to opaque.
1679      *
1680      * @param options A map of additional options to pass to the method.
1681      */
1682     fadeIn(options: JQueryAnimationOptions): JQuery;
1683
1684     /**
1685      * Hide the matched elements by fading them to transparent.
1686      *
1687      * @param duration A string or number determining how long the animation will run.
1688      * @param complete A function to call once the animation is complete.
1689      */
1690     fadeOut(duration?: number|string, complete?: Function): JQuery;
1691     /**
1692      * Hide the matched elements by fading them to transparent.
1693      *
1694      * @param duration A string or number determining how long the animation will run.
1695      * @param easing A string indicating which easing function to use for the transition.
1696      * @param complete A function to call once the animation is complete.
1697      */
1698     fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery;
1699     /**
1700      * Hide the matched elements by fading them to transparent.
1701      *
1702      * @param options A map of additional options to pass to the method.
1703      */
1704     fadeOut(options: JQueryAnimationOptions): JQuery;
1705
1706     /**
1707      * Adjust the opacity of the matched elements.
1708      *
1709      * @param duration A string or number determining how long the animation will run.
1710      * @param opacity A number between 0 and 1 denoting the target opacity.
1711      * @param complete A function to call once the animation is complete.
1712      */
1713     fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery;
1714     /**
1715      * Adjust the opacity of the matched elements.
1716      *
1717      * @param duration A string or number determining how long the animation will run.
1718      * @param opacity A number between 0 and 1 denoting the target opacity.
1719      * @param easing A string indicating which easing function to use for the transition.
1720      * @param complete A function to call once the animation is complete.
1721      */
1722     fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery;
1723
1724     /**
1725      * Display or hide the matched elements by animating their opacity.
1726      *
1727      * @param duration A string or number determining how long the animation will run.
1728      * @param complete A function to call once the animation is complete.
1729      */
1730     fadeToggle(duration?: number|string, complete?: Function): JQuery;
1731     /**
1732      * Display or hide the matched elements by animating their opacity.
1733      *
1734      * @param duration A string or number determining how long the animation will run.
1735      * @param easing A string indicating which easing function to use for the transition.
1736      * @param complete A function to call once the animation is complete.
1737      */
1738     fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1739     /**
1740      * Display or hide the matched elements by animating their opacity.
1741      *
1742      * @param options A map of additional options to pass to the method.
1743      */
1744     fadeToggle(options: JQueryAnimationOptions): JQuery;
1745
1746     /**
1747      * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
1748      *
1749      * @param queue The name of the queue in which to stop animations.
1750      */
1751     finish(queue?: string): JQuery;
1752
1753     /**
1754      * Hide the matched elements.
1755      *
1756      * @param duration A string or number determining how long the animation will run.
1757      * @param complete A function to call once the animation is complete.
1758      */
1759     hide(duration?: number|string, complete?: Function): JQuery;
1760     /**
1761      * Hide the matched elements.
1762      *
1763      * @param duration A string or number determining how long the animation will run.
1764      * @param easing A string indicating which easing function to use for the transition.
1765      * @param complete A function to call once the animation is complete.
1766      */
1767     hide(duration?: number|string, easing?: string, complete?: Function): JQuery;
1768     /**
1769      * Hide the matched elements.
1770      *
1771      * @param options A map of additional options to pass to the method.
1772      */
1773     hide(options: JQueryAnimationOptions): JQuery;
1774
1775     /**
1776      * Display the matched elements.
1777      *
1778      * @param duration A string or number determining how long the animation will run.
1779      * @param complete A function to call once the animation is complete.
1780      */
1781     show(duration?: number|string, complete?: Function): JQuery;
1782     /**
1783      * Display the matched elements.
1784      *
1785      * @param duration A string or number determining how long the animation will run.
1786      * @param easing A string indicating which easing function to use for the transition.
1787      * @param complete A function to call once the animation is complete.
1788      */
1789     show(duration?: number|string, easing?: string, complete?: Function): JQuery;
1790     /**
1791      * Display the matched elements.
1792      *
1793      * @param options A map of additional options to pass to the method.
1794      */
1795     show(options: JQueryAnimationOptions): JQuery;
1796
1797     /**
1798      * Display the matched elements with a sliding motion.
1799      *
1800      * @param duration A string or number determining how long the animation will run.
1801      * @param complete A function to call once the animation is complete.
1802      */
1803     slideDown(duration?: number|string, complete?: Function): JQuery;
1804     /**
1805      * Display the matched elements with a sliding motion.
1806      *
1807      * @param duration A string or number determining how long the animation will run.
1808      * @param easing A string indicating which easing function to use for the transition.
1809      * @param complete A function to call once the animation is complete.
1810      */
1811     slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery;
1812     /**
1813      * Display the matched elements with a sliding motion.
1814      *
1815      * @param options A map of additional options to pass to the method.
1816      */
1817     slideDown(options: JQueryAnimationOptions): JQuery;
1818
1819     /**
1820      * Display or hide the matched elements with a sliding motion.
1821      *
1822      * @param duration A string or number determining how long the animation will run.
1823      * @param complete A function to call once the animation is complete.
1824      */
1825     slideToggle(duration?: number|string, complete?: Function): JQuery;
1826     /**
1827      * Display or hide the matched elements with a sliding motion.
1828      *
1829      * @param duration A string or number determining how long the animation will run.
1830      * @param easing A string indicating which easing function to use for the transition.
1831      * @param complete A function to call once the animation is complete.
1832      */
1833     slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1834     /**
1835      * Display or hide the matched elements with a sliding motion.
1836      *
1837      * @param options A map of additional options to pass to the method.
1838      */
1839     slideToggle(options: JQueryAnimationOptions): JQuery;
1840
1841     /**
1842      * Hide the matched elements with a sliding motion.
1843      *
1844      * @param duration A string or number determining how long the animation will run.
1845      * @param complete A function to call once the animation is complete.
1846      */
1847     slideUp(duration?: number|string, complete?: Function): JQuery;
1848     /**
1849      * Hide the matched elements with a sliding motion.
1850      *
1851      * @param duration A string or number determining how long the animation will run.
1852      * @param easing A string indicating which easing function to use for the transition.
1853      * @param complete A function to call once the animation is complete.
1854      */
1855     slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery;
1856     /**
1857      * Hide the matched elements with a sliding motion.
1858      *
1859      * @param options A map of additional options to pass to the method.
1860      */
1861     slideUp(options: JQueryAnimationOptions): JQuery;
1862
1863     /**
1864      * Stop the currently-running animation on the matched elements.
1865      *
1866      * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1867      * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1868      */
1869     stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1870     /**
1871      * Stop the currently-running animation on the matched elements.
1872      *
1873      * @param queue The name of the queue in which to stop animations.
1874      * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1875      * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1876      */
1877     stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1878
1879     /**
1880      * Display or hide the matched elements.
1881      *
1882      * @param duration A string or number determining how long the animation will run.
1883      * @param complete A function to call once the animation is complete.
1884      */
1885     toggle(duration?: number|string, complete?: Function): JQuery;
1886     /**
1887      * Display or hide the matched elements.
1888      *
1889      * @param duration A string or number determining how long the animation will run.
1890      * @param easing A string indicating which easing function to use for the transition.
1891      * @param complete A function to call once the animation is complete.
1892      */
1893     toggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1894     /**
1895      * Display or hide the matched elements.
1896      *
1897      * @param options A map of additional options to pass to the method.
1898      */
1899     toggle(options: JQueryAnimationOptions): JQuery;
1900     /**
1901      * Display or hide the matched elements.
1902      *
1903      * @param showOrHide A Boolean indicating whether to show or hide the elements.
1904      */
1905     toggle(showOrHide: boolean): JQuery;
1906
1907     /**
1908      * Attach a handler to an event for the elements.
1909      * 
1910      * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1911      * @param eventData An object containing data that will be passed to the event handler.
1912      * @param handler A function to execute each time the event is triggered.
1913      */
1914     bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
1915     /**
1916      * Attach a handler to an event for the elements.
1917      * 
1918      * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1919      * @param handler A function to execute each time the event is triggered.
1920      */
1921     bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
1922     /**
1923      * Attach a handler to an event for the elements.
1924      * 
1925      * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1926      * @param eventData An object containing data that will be passed to the event handler.
1927      * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
1928      */
1929     bind(eventType: string, eventData: any, preventBubble: boolean): JQuery;
1930     /**
1931      * Attach a handler to an event for the elements.
1932      * 
1933      * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1934      * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
1935      */
1936     bind(eventType: string, preventBubble: boolean): JQuery;
1937     /**
1938      * Attach a handler to an event for the elements.
1939      * 
1940      * @param events An object containing one or more DOM event types and functions to execute for them.
1941      */
1942     bind(events: any): JQuery;
1943
1944     /**
1945      * Trigger the "blur" event on an element
1946      */
1947     blur(): JQuery;
1948     /**
1949      * Bind an event handler to the "blur" JavaScript event
1950      *
1951      * @param handler A function to execute each time the event is triggered.
1952      */
1953     blur(handler: (eventObject: JQueryEventObject) => any): JQuery;
1954     /**
1955      * Bind an event handler to the "blur" JavaScript event
1956      *
1957      * @param eventData An object containing data that will be passed to the event handler.
1958      * @param handler A function to execute each time the event is triggered.
1959      */
1960     blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1961
1962     /**
1963      * Trigger the "change" event on an element.
1964      */
1965     change(): JQuery;
1966     /**
1967      * Bind an event handler to the "change" JavaScript event
1968      *
1969      * @param handler A function to execute each time the event is triggered.
1970      */
1971     change(handler: (eventObject: JQueryEventObject) => any): JQuery;
1972     /**
1973      * Bind an event handler to the "change" JavaScript event
1974      *
1975      * @param eventData An object containing data that will be passed to the event handler.
1976      * @param handler A function to execute each time the event is triggered.
1977      */
1978     change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1979
1980     /**
1981      * Trigger the "click" event on an element.
1982      */
1983     click(): JQuery;
1984     /**
1985      * Bind an event handler to the "click" JavaScript event
1986      *
1987      * @param eventData An object containing data that will be passed to the event handler.
1988      */
1989     click(handler: (eventObject: JQueryEventObject) => any): JQuery;
1990     /**
1991      * Bind an event handler to the "click" JavaScript event
1992      *
1993      * @param eventData An object containing data that will be passed to the event handler.
1994      * @param handler A function to execute each time the event is triggered.
1995      */
1996     click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1997
1998     /**
1999      * Trigger the "contextmenu" event on an element.
2000      */
2001     contextmenu(): JQuery;
2002     /**
2003      * Bind an event handler to the "contextmenu" JavaScript event.
2004      *
2005      * @param handler A function to execute when the event is triggered.
2006      */
2007     contextmenu(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2008     /**
2009      * Bind an event handler to the "contextmenu" JavaScript event.
2010      *
2011      * @param eventData An object containing data that will be passed to the event handler.
2012      * @param handler A function to execute when the event is triggered.
2013      */
2014     contextmenu(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2015
2016     /**
2017      * Trigger the "dblclick" event on an element.
2018      */
2019     dblclick(): JQuery;
2020     /**
2021      * Bind an event handler to the "dblclick" JavaScript event
2022      *
2023      * @param handler A function to execute each time the event is triggered.
2024      */
2025     dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery;
2026     /**
2027      * Bind an event handler to the "dblclick" JavaScript event
2028      *
2029      * @param eventData An object containing data that will be passed to the event handler.
2030      * @param handler A function to execute each time the event is triggered.
2031      */
2032     dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2033
2034     delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2035     delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2036
2037     /**
2038      * Trigger the "focus" event on an element.
2039      */
2040     focus(): JQuery;
2041     /**
2042      * Bind an event handler to the "focus" JavaScript event
2043      *
2044      * @param handler A function to execute each time the event is triggered.
2045      */
2046     focus(handler: (eventObject: JQueryEventObject) => any): JQuery;
2047     /**
2048      * Bind an event handler to the "focus" JavaScript event
2049      *
2050      * @param eventData An object containing data that will be passed to the event handler.
2051      * @param handler A function to execute each time the event is triggered.
2052      */
2053     focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2054
2055     /**
2056      * Trigger the "focusin" event on an element.
2057      */
2058     focusin(): JQuery;
2059     /**
2060      * Bind an event handler to the "focusin" JavaScript event
2061      *
2062      * @param handler A function to execute each time the event is triggered.
2063      */
2064     focusin(handler: (eventObject: JQueryEventObject) => any): JQuery;
2065     /**
2066      * Bind an event handler to the "focusin" JavaScript event
2067      *
2068      * @param eventData An object containing data that will be passed to the event handler.
2069      * @param handler A function to execute each time the event is triggered.
2070      */
2071     focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2072
2073     /**
2074      * Trigger the "focusout" event on an element.
2075      */
2076     focusout(): JQuery;
2077     /**
2078      * Bind an event handler to the "focusout" JavaScript event
2079      *
2080      * @param handler A function to execute each time the event is triggered.
2081      */
2082     focusout(handler: (eventObject: JQueryEventObject) => any): JQuery;
2083     /**
2084      * Bind an event handler to the "focusout" JavaScript event
2085      *
2086      * @param eventData An object containing data that will be passed to the event handler.
2087      * @param handler A function to execute each time the event is triggered.
2088      */
2089     focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2090
2091     /**
2092      * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
2093      *
2094      * @param handlerIn A function to execute when the mouse pointer enters the element.
2095      * @param handlerOut A function to execute when the mouse pointer leaves the element.
2096      */
2097     hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery;
2098     /**
2099      * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
2100      *
2101      * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element.
2102      */
2103     hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery;
2104
2105     /**
2106      * Trigger the "keydown" event on an element.
2107      */
2108     keydown(): JQuery;
2109     /**
2110      * Bind an event handler to the "keydown" JavaScript event
2111      *
2112      * @param handler A function to execute each time the event is triggered.
2113      */
2114     keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2115     /**
2116      * Bind an event handler to the "keydown" JavaScript event
2117      *
2118      * @param eventData An object containing data that will be passed to the event handler.
2119      * @param handler A function to execute each time the event is triggered.
2120      */
2121     keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2122
2123     /**
2124      * Trigger the "keypress" event on an element.
2125      */
2126     keypress(): JQuery;
2127     /**
2128      * Bind an event handler to the "keypress" JavaScript event
2129      *
2130      * @param handler A function to execute each time the event is triggered.
2131      */
2132     keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2133     /**
2134      * Bind an event handler to the "keypress" JavaScript event
2135      *
2136      * @param eventData An object containing data that will be passed to the event handler.
2137      * @param handler A function to execute each time the event is triggered.
2138      */
2139     keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2140
2141     /**
2142      * Trigger the "keyup" event on an element.
2143      */
2144     keyup(): JQuery;
2145     /**
2146      * Bind an event handler to the "keyup" JavaScript event
2147      *
2148      * @param handler A function to execute each time the event is triggered.
2149      */
2150     keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2151     /**
2152      * Bind an event handler to the "keyup" JavaScript event
2153      *
2154      * @param eventData An object containing data that will be passed to the event handler.
2155      * @param handler A function to execute each time the event is triggered.
2156      */
2157     keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2158
2159     /**
2160      * Bind an event handler to the "load" JavaScript event.
2161      *
2162      * @param handler A function to execute when the event is triggered.
2163      */
2164     load(handler: (eventObject: JQueryEventObject) => any): JQuery;
2165     /**
2166      * Bind an event handler to the "load" JavaScript event.
2167      *
2168      * @param eventData An object containing data that will be passed to the event handler.
2169      * @param handler A function to execute when the event is triggered.
2170      */
2171     load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2172
2173     /**
2174      * Trigger the "mousedown" event on an element.
2175      */
2176     mousedown(): JQuery;
2177     /**
2178      * Bind an event handler to the "mousedown" JavaScript event.
2179      *
2180      * @param handler A function to execute when the event is triggered.
2181      */
2182     mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2183     /**
2184      * Bind an event handler to the "mousedown" JavaScript event.
2185      *
2186      * @param eventData An object containing data that will be passed to the event handler.
2187      * @param handler A function to execute when the event is triggered.
2188      */
2189     mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2190
2191     /**
2192      * Trigger the "mouseenter" event on an element.
2193      */
2194     mouseenter(): JQuery;
2195     /**
2196      * Bind an event handler to be fired when the mouse enters an element.
2197      *
2198      * @param handler A function to execute when the event is triggered.
2199      */
2200     mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2201     /**
2202      * Bind an event handler to be fired when the mouse enters an element.
2203      *
2204      * @param eventData An object containing data that will be passed to the event handler.
2205      * @param handler A function to execute when the event is triggered.
2206      */
2207     mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2208
2209     /**
2210      * Trigger the "mouseleave" event on an element.
2211      */
2212     mouseleave(): JQuery;
2213     /**
2214      * Bind an event handler to be fired when the mouse leaves an element.
2215      *
2216      * @param handler A function to execute when the event is triggered.
2217      */
2218     mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2219     /**
2220      * Bind an event handler to be fired when the mouse leaves an element.
2221      *
2222      * @param eventData An object containing data that will be passed to the event handler.
2223      * @param handler A function to execute when the event is triggered.
2224      */
2225     mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2226
2227     /**
2228      * Trigger the "mousemove" event on an element.
2229      */
2230     mousemove(): JQuery;
2231     /**
2232      * Bind an event handler to the "mousemove" JavaScript event.
2233      *
2234      * @param handler A function to execute when the event is triggered.
2235      */
2236     mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2237     /**
2238      * Bind an event handler to the "mousemove" JavaScript event.
2239      *
2240      * @param eventData An object containing data that will be passed to the event handler.
2241      * @param handler A function to execute when the event is triggered.
2242      */
2243     mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2244
2245     /**
2246      * Trigger the "mouseout" event on an element.
2247      */
2248     mouseout(): JQuery;
2249     /**
2250      * Bind an event handler to the "mouseout" JavaScript event.
2251      *
2252      * @param handler A function to execute when the event is triggered.
2253      */
2254     mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2255     /**
2256      * Bind an event handler to the "mouseout" JavaScript event.
2257      *
2258      * @param eventData An object containing data that will be passed to the event handler.
2259      * @param handler A function to execute when the event is triggered.
2260      */
2261     mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2262
2263     /**
2264      * Trigger the "mouseover" event on an element.
2265      */
2266     mouseover(): JQuery;
2267     /**
2268      * Bind an event handler to the "mouseover" JavaScript event.
2269      *
2270      * @param handler A function to execute when the event is triggered.
2271      */
2272     mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2273     /**
2274      * Bind an event handler to the "mouseover" JavaScript event.
2275      *
2276      * @param eventData An object containing data that will be passed to the event handler.
2277      * @param handler A function to execute when the event is triggered.
2278      */
2279     mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2280
2281     /**
2282      * Trigger the "mouseup" event on an element.
2283      */
2284     mouseup(): JQuery;
2285     /**
2286      * Bind an event handler to the "mouseup" JavaScript event.
2287      *
2288      * @param handler A function to execute when the event is triggered.
2289      */
2290     mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2291     /**
2292      * Bind an event handler to the "mouseup" JavaScript event.
2293      *
2294      * @param eventData An object containing data that will be passed to the event handler.
2295      * @param handler A function to execute when the event is triggered.
2296      */
2297     mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2298
2299     /**
2300      * Remove an event handler.
2301      */
2302     off(): JQuery;
2303     /**
2304      * Remove an event handler.
2305      *
2306      * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2307      * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2308      * @param handler A handler function previously attached for the event(s), or the special value false.
2309      */
2310     off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2311     /**
2312      * Remove an event handler.
2313      *
2314      * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2315      * @param handler A handler function previously attached for the event(s), or the special value false. Takes handler with extra args that can be attached with on().
2316      */
2317     off(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2318     /**
2319      * Remove an event handler.
2320      *
2321      * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2322      * @param handler A handler function previously attached for the event(s), or the special value false.
2323      */
2324     off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2325     /**
2326      * Remove an event handler.
2327      *
2328      * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).
2329      * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2330      */
2331     off(events: { [key: string]: any; }, selector?: string): JQuery;
2332
2333     /**
2334      * Attach an event handler function for one or more events to the selected elements.
2335      *
2336      * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2337      * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).
2338      */
2339     on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2340     /**
2341      * Attach an event handler function for one or more events to the selected elements.
2342      *
2343      * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2344      * @param data Data to be passed to the handler in event.data when an event is triggered.
2345      * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
2346     */
2347     on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2348     /**
2349      * Attach an event handler function for one or more events to the selected elements.
2350      *
2351      * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2352      * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
2353      * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
2354      */
2355     on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2356     /**
2357      * Attach an event handler function for one or more events to the selected elements.
2358      *
2359      * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2360      * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
2361      * @param data Data to be passed to the handler in event.data when an event is triggered.
2362      * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
2363      */
2364     on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2365     /**
2366      * Attach an event handler function for one or more events to the selected elements.
2367      *
2368      * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2369      * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
2370      * @param data Data to be passed to the handler in event.data when an event occurs.
2371      */
2372     on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2373     /**
2374      * Attach an event handler function for one or more events to the selected elements.
2375      *
2376      * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2377      * @param data Data to be passed to the handler in event.data when an event occurs.
2378      */
2379     on(events: { [key: string]: any; }, data?: any): JQuery;
2380
2381     /**
2382      * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2383      *
2384      * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2385      * @param handler A function to execute at the time the event is triggered.
2386      */
2387     one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2388     /**
2389      * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2390      *
2391      * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2392      * @param data An object containing data that will be passed to the event handler.
2393      * @param handler A function to execute at the time the event is triggered.
2394      */
2395     one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2396
2397     /**
2398      * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2399      *
2400      * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2401      * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
2402      * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
2403      */
2404     one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2405     /**
2406      * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2407      *
2408      * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2409      * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
2410      * @param data Data to be passed to the handler in event.data when an event is triggered.
2411      * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
2412      */
2413     one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2414
2415     /**
2416      * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2417      *
2418      * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2419      * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
2420      * @param data Data to be passed to the handler in event.data when an event occurs.
2421      */
2422     one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2423
2424     /**
2425      * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2426      *
2427      * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2428      * @param data Data to be passed to the handler in event.data when an event occurs.
2429      */
2430     one(events: { [key: string]: any; }, data?: any): JQuery;
2431
2432
2433     /**
2434      * Specify a function to execute when the DOM is fully loaded.
2435      *
2436      * @param handler A function to execute after the DOM is ready.
2437      */
2438     ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery;
2439
2440     /**
2441      * Trigger the "resize" event on an element.
2442      */
2443     resize(): JQuery;
2444     /**
2445      * Bind an event handler to the "resize" JavaScript event.
2446      *
2447      * @param handler A function to execute each time the event is triggered.
2448      */
2449     resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
2450     /**
2451      * Bind an event handler to the "resize" JavaScript event.
2452      *
2453      * @param eventData An object containing data that will be passed to the event handler.
2454      * @param handler A function to execute each time the event is triggered.
2455      */
2456     resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2457
2458     /**
2459      * Trigger the "scroll" event on an element.
2460      */
2461     scroll(): JQuery;
2462     /**
2463      * Bind an event handler to the "scroll" JavaScript event.
2464      *
2465      * @param handler A function to execute each time the event is triggered.
2466      */
2467     scroll(handler: (eventObject: JQueryEventObject) => any): JQuery;
2468     /**
2469      * Bind an event handler to the "scroll" JavaScript event.
2470      *
2471      * @param eventData An object containing data that will be passed to the event handler.
2472      * @param handler A function to execute each time the event is triggered.
2473      */
2474     scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2475
2476     /**
2477      * Trigger the "select" event on an element.
2478      */
2479     select(): JQuery;
2480     /**
2481      * Bind an event handler to the "select" JavaScript event.
2482      *
2483      * @param handler A function to execute each time the event is triggered.
2484      */
2485     select(handler: (eventObject: JQueryEventObject) => any): JQuery;
2486     /**
2487      * Bind an event handler to the "select" JavaScript event.
2488      *
2489      * @param eventData An object containing data that will be passed to the event handler.
2490      * @param handler A function to execute each time the event is triggered.
2491      */
2492     select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2493
2494     /**
2495      * Trigger the "submit" event on an element.
2496      */
2497     submit(): JQuery;
2498     /**
2499      * Bind an event handler to the "submit" JavaScript event
2500      *
2501      * @param handler A function to execute each time the event is triggered.
2502      */
2503     submit(handler: (eventObject: JQueryEventObject) => any): JQuery;
2504     /**
2505      * Bind an event handler to the "submit" JavaScript event
2506      *
2507      * @param eventData An object containing data that will be passed to the event handler.
2508      * @param handler A function to execute each time the event is triggered.
2509      */
2510     submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2511
2512     /**
2513      * Execute all handlers and behaviors attached to the matched elements for the given event type.
2514      * 
2515      * @param eventType A string containing a JavaScript event type, such as click or submit.
2516      * @param extraParameters Additional parameters to pass along to the event handler.
2517      */
2518     trigger(eventType: string, extraParameters?: any[]|Object): JQuery;
2519     /**
2520      * Execute all handlers and behaviors attached to the matched elements for the given event type.
2521      * 
2522      * @param event A jQuery.Event object.
2523      * @param extraParameters Additional parameters to pass along to the event handler.
2524      */
2525     trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery;
2526
2527     /**
2528      * Execute all handlers attached to an element for an event.
2529      * 
2530      * @param eventType A string containing a JavaScript event type, such as click or submit.
2531      * @param extraParameters An array of additional parameters to pass along to the event handler.
2532      */
2533     triggerHandler(eventType: string, ...extraParameters: any[]): Object;
2534
2535     /**
2536      * Execute all handlers attached to an element for an event.
2537      * 
2538      * @param event A jQuery.Event object.
2539      * @param extraParameters An array of additional parameters to pass along to the event handler.
2540      */
2541     triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object;
2542
2543     /**
2544      * Remove a previously-attached event handler from the elements.
2545      * 
2546      * @param eventType A string containing a JavaScript event type, such as click or submit.
2547      * @param handler The function that is to be no longer executed.
2548      */
2549     unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2550     /**
2551      * Remove a previously-attached event handler from the elements.
2552      * 
2553      * @param eventType A string containing a JavaScript event type, such as click or submit.
2554      * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).
2555      */
2556     unbind(eventType: string, fls: boolean): JQuery;
2557     /**
2558      * Remove a previously-attached event handler from the elements.
2559      * 
2560      * @param evt A JavaScript event object as passed to an event handler.
2561      */
2562     unbind(evt: any): JQuery;
2563
2564     /**
2565      * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2566      */
2567     undelegate(): JQuery;
2568     /**
2569      * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2570      * 
2571      * @param selector A selector which will be used to filter the event results.
2572      * @param eventType A string containing a JavaScript event type, such as "click" or "keydown"
2573      * @param handler A function to execute at the time the event is triggered.
2574      */
2575     undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2576     /**
2577      * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2578      * 
2579      * @param selector A selector which will be used to filter the event results.
2580      * @param events An object of one or more event types and previously bound functions to unbind from them.
2581      */
2582     undelegate(selector: string, events: Object): JQuery;
2583     /**
2584      * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2585      * 
2586      * @param namespace A string containing a namespace to unbind all events from.
2587      */
2588     undelegate(namespace: string): JQuery;
2589
2590     /**
2591      * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2592      * 
2593      * @param handler A function to execute when the event is triggered.
2594      */
2595     unload(handler: (eventObject: JQueryEventObject) => any): JQuery;
2596     /**
2597      * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2598      * 
2599      * @param eventData A plain object of data that will be passed to the event handler.
2600      * @param handler A function to execute when the event is triggered.
2601      */
2602     unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2603
2604     /**
2605      * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)
2606      */
2607     context: Element;
2608
2609     jquery: string;
2610
2611     /**
2612      * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2613      * 
2614      * @param handler A function to execute when the event is triggered.
2615      */
2616     error(handler: (eventObject: JQueryEventObject) => any): JQuery;
2617     /**
2618      * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2619      * 
2620      * @param eventData A plain object of data that will be passed to the event handler.
2621      * @param handler A function to execute when the event is triggered.
2622      */
2623     error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2624
2625     /**
2626      * Add a collection of DOM elements onto the jQuery stack.
2627      * 
2628      * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2629      */
2630     pushStack(elements: any[]): JQuery;
2631     /**
2632      * Add a collection of DOM elements onto the jQuery stack.
2633      * 
2634      * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2635      * @param name The name of a jQuery method that generated the array of elements.
2636      * @param arguments The arguments that were passed in to the jQuery method (for serialization).
2637      */
2638     pushStack(elements: any[], name: string, arguments: any[]): JQuery;
2639
2640     /**
2641      * Insert content, specified by the parameter, after each element in the set of matched elements.
2642      * 
2643      * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements.
2644      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
2645      */
2646     after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2647     /**
2648      * Insert content, specified by the parameter, after each element in the set of matched elements.
2649      * 
2650      * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2651      */
2652     after(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2653
2654     /**
2655      * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2656      * 
2657      * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
2658      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
2659      */
2660     append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2661     /**
2662      * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2663      * 
2664      * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
2665      */
2666     append(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2667
2668     /**
2669      * Insert every element in the set of matched elements to the end of the target.
2670      * 
2671      * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.
2672      */
2673     appendTo(target: JQuery|any[]|Element|string): JQuery;
2674
2675     /**
2676      * Insert content, specified by the parameter, before each element in the set of matched elements.
2677      * 
2678      * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements.
2679      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
2680      */
2681     before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2682     /**
2683      * Insert content, specified by the parameter, before each element in the set of matched elements.
2684      * 
2685      * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2686      */
2687     before(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2688
2689     /**
2690      * Create a deep copy of the set of matched elements.
2691      * 
2692      * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.
2693      * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).
2694      */
2695     clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery;
2696
2697     /**
2698      * Remove the set of matched elements from the DOM.
2699      * 
2700      * param selector A selector expression that filters the set of matched elements to be removed.
2701      */
2702     detach(selector?: string): JQuery;
2703
2704     /**
2705      * Remove all child nodes of the set of matched elements from the DOM.
2706      */
2707     empty(): JQuery;
2708
2709     /**
2710      * Insert every element in the set of matched elements after the target.
2711      * 
2712      * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.
2713      */
2714     insertAfter(target: JQuery|any[]|Element|Text|string): JQuery;
2715
2716     /**
2717      * Insert every element in the set of matched elements before the target.
2718      * 
2719      * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.
2720      */
2721     insertBefore(target: JQuery|any[]|Element|Text|string): JQuery;
2722
2723     /**
2724      * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2725      * 
2726      * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
2727      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
2728      */
2729     prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2730     /**
2731      * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2732      * 
2733      * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
2734      */
2735     prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2736
2737     /**
2738      * Insert every element in the set of matched elements to the beginning of the target.
2739      * 
2740      * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.
2741      */
2742     prependTo(target: JQuery|any[]|Element|string): JQuery;
2743
2744     /**
2745      * Remove the set of matched elements from the DOM.
2746      * 
2747      * @param selector A selector expression that filters the set of matched elements to be removed.
2748      */
2749     remove(selector?: string): JQuery;
2750
2751     /**
2752      * Replace each target element with the set of matched elements.
2753      * 
2754      * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.
2755      */
2756     replaceAll(target: JQuery|any[]|Element|string): JQuery;
2757
2758     /**
2759      * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2760      * 
2761      * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
2762      */
2763     replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery;
2764     /**
2765      * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2766      * 
2767      * param func A function that returns content with which to replace the set of matched elements.
2768      */
2769     replaceWith(func: () => Element|JQuery): JQuery;
2770
2771     /**
2772      * Get the combined text contents of each element in the set of matched elements, including their descendants.
2773      */
2774     text(): string;
2775     /**
2776      * Set the content of each element in the set of matched elements to the specified text.
2777      * 
2778      * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation.
2779      */
2780     text(text: string|number|boolean): JQuery;
2781     /**
2782      * Set the content of each element in the set of matched elements to the specified text.
2783      * 
2784      * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.
2785      */
2786     text(func: (index: number, text: string) => string): JQuery;
2787
2788     /**
2789      * Retrieve all the elements contained in the jQuery set, as an array.
2790      * @name toArray
2791      */
2792     toArray(): HTMLElement[];
2793
2794     /**
2795      * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
2796      */
2797     unwrap(): JQuery;
2798
2799     /**
2800      * Wrap an HTML structure around each element in the set of matched elements.
2801      * 
2802      * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2803      */
2804     wrap(wrappingElement: JQuery|Element|string): JQuery;
2805     /**
2806      * Wrap an HTML structure around each element in the set of matched elements.
2807      * 
2808      * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2809      */
2810     wrap(func: (index: number) => string|JQuery): JQuery;
2811
2812     /**
2813      * Wrap an HTML structure around all elements in the set of matched elements.
2814      * 
2815      * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2816      */
2817     wrapAll(wrappingElement: JQuery|Element|string): JQuery;
2818     wrapAll(func: (index: number) => string): JQuery;
2819
2820     /**
2821      * Wrap an HTML structure around the content of each element in the set of matched elements.
2822      * 
2823      * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
2824      */
2825     wrapInner(wrappingElement: JQuery|Element|string): JQuery;
2826     /**
2827      * Wrap an HTML structure around the content of each element in the set of matched elements.
2828      * 
2829      * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2830      */
2831     wrapInner(func: (index: number) => string): JQuery;
2832
2833     /**
2834      * Iterate over a jQuery object, executing a function for each matched element.
2835      * 
2836      * @param func A function to execute for each matched element.
2837      */
2838     each(func: (index: number, elem: Element) => any): JQuery;
2839
2840     /**
2841      * Retrieve one of the elements matched by the jQuery object.
2842      * 
2843      * @param index A zero-based integer indicating which element to retrieve.
2844      */
2845     get(index: number): HTMLElement;
2846     /**
2847      * Retrieve the elements matched by the jQuery object.
2848      * @alias toArray
2849      */
2850     get(): HTMLElement[];
2851
2852     /**
2853      * Search for a given element from among the matched elements.
2854      */
2855     index(): number;
2856     /**
2857      * Search for a given element from among the matched elements.
2858      * 
2859      * @param selector A selector representing a jQuery collection in which to look for an element.
2860      */
2861     index(selector: string|JQuery|Element): number;
2862
2863     /**
2864      * The number of elements in the jQuery object.
2865      */
2866     length: number;
2867     /**
2868      * A selector representing selector passed to jQuery(), if any, when creating the original set.
2869      * version deprecated: 1.7, removed: 1.9
2870      */
2871     selector: string;
2872     [index: string]: any;
2873     [index: number]: HTMLElement;
2874
2875     /**
2876      * Add elements to the set of matched elements.
2877      * 
2878      * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements.
2879      * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
2880      */
2881     add(selector: string, context?: Element): JQuery;
2882     /**
2883      * Add elements to the set of matched elements.
2884      * 
2885      * @param elements One or more elements to add to the set of matched elements.
2886      */
2887     add(...elements: Element[]): JQuery;
2888     /**
2889      * Add elements to the set of matched elements.
2890      * 
2891      * @param html An HTML fragment to add to the set of matched elements.
2892      */
2893     add(html: string): JQuery;
2894     /**
2895      * Add elements to the set of matched elements.
2896      * 
2897      * @param obj An existing jQuery object to add to the set of matched elements.
2898      */
2899     add(obj: JQuery): JQuery;
2900
2901     /**
2902      * Get the children of each element in the set of matched elements, optionally filtered by a selector.
2903      * 
2904      * @param selector A string containing a selector expression to match elements against.
2905      */
2906     children(selector?: string): JQuery;
2907
2908     /**
2909      * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2910      * 
2911      * @param selector A string containing a selector expression to match elements against.
2912      */
2913     closest(selector: string): JQuery;
2914     /**
2915      * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2916      * 
2917      * @param selector A string containing a selector expression to match elements against.
2918      * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
2919      */
2920     closest(selector: string, context?: Element): JQuery;
2921     /**
2922      * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2923      * 
2924      * @param obj A jQuery object to match elements against.
2925      */
2926     closest(obj: JQuery): JQuery;
2927     /**
2928      * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2929      * 
2930      * @param element An element to match elements against.
2931      */
2932     closest(element: Element): JQuery;
2933
2934     /**
2935      * Get an array of all the elements and selectors matched against the current element up through the DOM tree.
2936      * 
2937      * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object).
2938      * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
2939      */
2940     closest(selectors: any, context?: Element): any[];
2941
2942     /**
2943      * Get the children of each element in the set of matched elements, including text and comment nodes.
2944      */
2945     contents(): JQuery;
2946
2947     /**
2948      * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
2949      */
2950     end(): JQuery;
2951
2952     /**
2953      * Reduce the set of matched elements to the one at the specified index.
2954      * 
2955      * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.
2956      *  
2957      */
2958     eq(index: number): JQuery;
2959
2960     /**
2961      * Reduce the set of matched elements to those that match the selector or pass the function's test.
2962      * 
2963      * @param selector A string containing a selector expression to match the current set of elements against.
2964      */
2965     filter(selector: string): JQuery;
2966     /**
2967      * Reduce the set of matched elements to those that match the selector or pass the function's test.
2968      * 
2969      * @param func A function used as a test for each element in the set. this is the current DOM element.
2970      */
2971     filter(func: (index: number, element: Element) => any): JQuery;
2972     /**
2973      * Reduce the set of matched elements to those that match the selector or pass the function's test.
2974      * 
2975      * @param element An element to match the current set of elements against.
2976      */
2977     filter(element: Element): JQuery;
2978     /**
2979      * Reduce the set of matched elements to those that match the selector or pass the function's test.
2980      * 
2981      * @param obj An existing jQuery object to match the current set of elements against.
2982      */
2983     filter(obj: JQuery): JQuery;
2984
2985     /**
2986      * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2987      * 
2988      * @param selector A string containing a selector expression to match elements against.
2989      */
2990     find(selector: string): JQuery;
2991     /**
2992      * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2993      * 
2994      * @param element An element to match elements against.
2995      */
2996     find(element: Element): JQuery;
2997     /**
2998      * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2999      * 
3000      * @param obj A jQuery object to match elements against.
3001      */
3002     find(obj: JQuery): JQuery;
3003
3004     /**
3005      * Reduce the set of matched elements to the first in the set.
3006      */
3007     first(): JQuery;
3008
3009     /**
3010      * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
3011      * 
3012      * @param selector A string containing a selector expression to match elements against.
3013      */
3014     has(selector: string): JQuery;
3015     /**
3016      * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
3017      * 
3018      * @param contained A DOM element to match elements against.
3019      */
3020     has(contained: Element): JQuery;
3021
3022     /**
3023      * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
3024      * 
3025      * @param selector A string containing a selector expression to match elements against.
3026      */
3027     is(selector: string): boolean;
3028     /**
3029      * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
3030      * 
3031      * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.
3032      */
3033     is(func: (index: number, element: Element) => boolean): boolean;
3034     /**
3035      * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
3036      * 
3037      * @param obj An existing jQuery object to match the current set of elements against.
3038      */
3039     is(obj: JQuery): boolean;
3040     /**
3041      * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
3042      * 
3043      * @param elements One or more elements to match the current set of elements against.
3044      */
3045     is(elements: any): boolean;
3046
3047     /**
3048      * Reduce the set of matched elements to the final one in the set.
3049      */
3050     last(): JQuery;
3051
3052     /**
3053      * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
3054      * 
3055      * @param callback A function object that will be invoked for each element in the current set.
3056      */
3057     map(callback: (index: number, domElement: Element) => any): JQuery;
3058
3059     /**
3060      * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
3061      * 
3062      * @param selector A string containing a selector expression to match elements against.
3063      */
3064     next(selector?: string): JQuery;
3065
3066     /**
3067      * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
3068      * 
3069      * @param selector A string containing a selector expression to match elements against.
3070      */
3071     nextAll(selector?: string): JQuery;
3072
3073     /**
3074      * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3075      * 
3076      * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements.
3077      * @param filter A string containing a selector expression to match elements against.
3078      */
3079     nextUntil(selector?: string, filter?: string): JQuery;
3080     /**
3081      * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3082      * 
3083      * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements.
3084      * @param filter A string containing a selector expression to match elements against.
3085      */
3086     nextUntil(element?: Element, filter?: string): JQuery;
3087     /**
3088      * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3089      * 
3090      * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements.
3091      * @param filter A string containing a selector expression to match elements against.
3092      */
3093     nextUntil(obj?: JQuery, filter?: string): JQuery;
3094
3095     /**
3096      * Remove elements from the set of matched elements.
3097      * 
3098      * @param selector A string containing a selector expression to match elements against.
3099      */
3100     not(selector: string): JQuery;
3101     /**
3102      * Remove elements from the set of matched elements.
3103      * 
3104      * @param func A function used as a test for each element in the set. this is the current DOM element.
3105      */
3106     not(func: (index: number, element: Element) => boolean): JQuery;
3107     /**
3108      * Remove elements from the set of matched elements.
3109      * 
3110      * @param elements One or more DOM elements to remove from the matched set.
3111      */
3112     not(elements: Element|Element[]): JQuery;
3113     /**
3114      * Remove elements from the set of matched elements.
3115      * 
3116      * @param obj An existing jQuery object to match the current set of elements against.
3117      */
3118     not(obj: JQuery): JQuery;
3119
3120     /**
3121      * Get the closest ancestor element that is positioned.
3122      */
3123     offsetParent(): JQuery;
3124
3125     /**
3126      * Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
3127      * 
3128      * @param selector A string containing a selector expression to match elements against.
3129      */
3130     parent(selector?: string): JQuery;
3131
3132     /**
3133      * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
3134      * 
3135      * @param selector A string containing a selector expression to match elements against.
3136      */
3137     parents(selector?: string): JQuery;
3138
3139     /**
3140      * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
3141      * 
3142      * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements.
3143      * @param filter A string containing a selector expression to match elements against.
3144      */
3145     parentsUntil(selector?: string, filter?: string): JQuery;
3146     /**
3147      * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
3148      * 
3149      * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements.
3150      * @param filter A string containing a selector expression to match elements against.
3151      */
3152     parentsUntil(element?: Element, filter?: string): JQuery;
3153     /**
3154      * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
3155      * 
3156      * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements.
3157      * @param filter A string containing a selector expression to match elements against.
3158      */
3159     parentsUntil(obj?: JQuery, filter?: string): JQuery;
3160
3161     /**
3162      * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
3163      * 
3164      * @param selector A string containing a selector expression to match elements against.
3165      */
3166     prev(selector?: string): JQuery;
3167
3168     /**
3169      * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
3170      * 
3171      * @param selector A string containing a selector expression to match elements against.
3172      */
3173     prevAll(selector?: string): JQuery;
3174
3175     /**
3176      * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3177      * 
3178      * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements.
3179      * @param filter A string containing a selector expression to match elements against.
3180      */
3181     prevUntil(selector?: string, filter?: string): JQuery;
3182     /**
3183      * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3184      * 
3185      * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3186      * @param filter A string containing a selector expression to match elements against.
3187      */
3188     prevUntil(element?: Element, filter?: string): JQuery;
3189     /**
3190      * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3191      * 
3192      * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3193      * @param filter A string containing a selector expression to match elements against.
3194      */
3195     prevUntil(obj?: JQuery, filter?: string): JQuery;
3196
3197     /**
3198      * Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
3199      * 
3200      * @param selector A string containing a selector expression to match elements against.
3201      */
3202     siblings(selector?: string): JQuery;
3203
3204     /**
3205      * Reduce the set of matched elements to a subset specified by a range of indices.
3206      * 
3207      * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.
3208      * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.
3209      */
3210     slice(start: number, end?: number): JQuery;
3211
3212     /**
3213      * Show the queue of functions to be executed on the matched elements.
3214      * 
3215      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3216      */
3217     queue(queueName?: string): any[];
3218     /**
3219      * Manipulate the queue of functions to be executed, once for each matched element.
3220      * 
3221      * @param newQueue An array of functions to replace the current queue contents.
3222      */
3223     queue(newQueue: Function[]): JQuery;
3224     /**
3225      * Manipulate the queue of functions to be executed, once for each matched element.
3226      * 
3227      * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3228      */
3229     queue(callback: Function): JQuery;
3230     /**
3231      * Manipulate the queue of functions to be executed, once for each matched element.
3232      * 
3233      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3234      * @param newQueue An array of functions to replace the current queue contents.
3235      */
3236     queue(queueName: string, newQueue: Function[]): JQuery;
3237     /**
3238      * Manipulate the queue of functions to be executed, once for each matched element.
3239      * 
3240      * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3241      * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3242      */
3243     queue(queueName: string, callback: Function): JQuery;
3244 }
3245 declare module "jquery" {
3246     export = $;
3247 }
3248 declare var jQuery: JQueryStatic;
3249 declare var $: JQueryStatic;