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