bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/annotate/web/static/js/typings/main/ambient/jquery/jquery.d.ts (about)

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