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