@types/jquery 3.3.26 → 3.3.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
jquery/JQuery.d.ts CHANGED
@@ -83,6 +83,7 @@ $( document.body )
83
83
  * @since 1.4
84
84
  */
85
85
  add(selector: JQuery.Selector, context: Element): this;
86
+ // TODO: The return type should reflect newly selected types.
86
87
  /**
87
88
  * Create a new jQuery object with elements added to the set of matched elements.
88
89
  * @param selector_elements_html_selection _@param_ `selector_elements_html_selection`
@@ -226,7 +227,7 @@ collection.css( "background", "yellow" );
226
227
  </html>
227
228
  ```
228
229
  */
229
- add(selector_elements_html_selection: JQuery.Selector | JQuery.TypeOrArray<Element> | JQuery.htmlString | JQuery): this;
230
+ add(selector_elements_html_selection: JQuery.Selector | JQuery.TypeOrArray<Element> | JQuery.htmlString | JQuery | JQuery.Node): this;
230
231
  /**
231
232
  * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
232
233
  * @param selector A string containing a selector expression to match the current set of elements against.
@@ -5141,7 +5142,9 @@ $( "div b" )
5141
5142
  </html>
5142
5143
  ```
5143
5144
  */
5144
- html(htmlString_function: JQuery.htmlString | ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString)): this;
5145
+ html(htmlString_function: JQuery.htmlString |
5146
+ JQuery.Node |
5147
+ ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString | JQuery.Node)): this;
5145
5148
  /**
5146
5149
  * Get the HTML contents of the first element in the set of matched elements.
5147
5150
  * @see \`{@link https://api.jquery.com/html/ }\`
@@ -9990,7 +9993,14 @@ $( "button" ).on( "click", function() {
9990
9993
  </html>
9991
9994
  ```
9992
9995
  */
9993
- replaceWith(newContent_function: JQuery.htmlString | JQuery | JQuery.TypeOrArray<Element> | ((this: TElement) => any)): this;
9996
+ replaceWith(newContent_function: JQuery.htmlString |
9997
+ JQuery<JQuery.Node> |
9998
+ JQuery.TypeOrArray<Element> |
9999
+ JQuery.Node |
10000
+ ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString |
10001
+ JQuery<JQuery.Node> |
10002
+ JQuery.TypeOrArray<Element> |
10003
+ JQuery.Node)): this;
9994
10004
  /**
9995
10005
  * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.
9996
10006
  * @param eventData An object containing data that will be passed to the event handler.
jquery/JQueryStatic.d.ts CHANGED
@@ -148,21 +148,26 @@ $( "div", xml.responseXML );
148
148
  $( document.body ).css( "background", "black" );
149
149
  ```
150
150
  */
151
- // Using a unified signature is not possible due to a TypeScript 2.4 bug (DefinitelyTyped#27810)
152
- <T extends Element>(element: T): JQuery<T>;
151
+ // NOTE: `HTMLSelectElement` is both an Element and an Array-Like Object but jQuery treats it as an Element.
152
+ (element: HTMLSelectElement): JQuery<HTMLSelectElement>;
153
153
  /**
154
154
  * Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string.
155
- * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
155
+ * @param element_elementArray _&#x40;param_ `element_elementArray`
156
+ * <br>
157
+ * * `element` — A DOM element to wrap in a jQuery object. <br>
158
+ * * `elementArray` — An array containing a set of DOM elements to wrap in a jQuery object.
156
159
  * @see \`{@link https://api.jquery.com/jQuery/ }\`
157
160
  * @since 1.0
161
+ * @example ​ ````Set the background color of the page to black.
162
+ ```javascript
163
+ $( document.body ).css( "background", "black" );
164
+ ```
158
165
  * @example ​ ````Hide all the input elements within a form.
159
166
  ```javascript
160
167
  $( myForm.elements ).hide();
161
168
  ```
162
169
  */
163
- // Using a unified signature is not possible due to a TypeScript 2.4 bug (DefinitelyTyped#27810)
164
- // tslint:disable-next-line:unified-signatures
165
- <T extends Element>(elementArray: T[]): JQuery<T>;
170
+ <T extends Element>(element_elementArray: T | ArrayLike<T>): JQuery<T>;
166
171
  /**
167
172
  * Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string.
168
173
  * @param selection An existing jQuery object to clone.
jquery/README.md CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for jquery (https://jquery.com).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery
9
9
 
10
10
  Additional Details
11
- * Last updated: Thu, 13 Dec 2018 19:22:44 GMT
11
+ * Last updated: Mon, 24 Jun 2019 19:52:03 GMT
12
12
  * Dependencies: @types/sizzle
13
13
  * Global values: $, Symbol, jQuery
14
14
 
15
15
  # Credits
16
- These definitions were written by Leonard Thieu <https://github.com/leonard-thieu>, 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>, 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>, Thomas Schulz <https://github.com/King2500>, Terry Mun <https://github.com/terrymun>.
16
+ These definitions were written by Leonard Thieu <https://github.com/leonard-thieu>, 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>, 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>, Thomas Schulz <https://github.com/King2500>, and Terry Mun <https://github.com/terrymun>.
jquery/legacy.d.ts CHANGED
@@ -167,9 +167,12 @@ interface JQueryMouseEventObject extends JQueryInputEventObject {
167
167
  * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`.
168
168
  */
169
169
  interface JQueryKeyEventObject extends JQueryInputEventObject {
170
- char: any;
170
+ /** @deprecated */
171
+ char: string;
172
+ /** @deprecated */
171
173
  charCode: number;
172
- key: any;
174
+ key: string;
175
+ /** @deprecated */
173
176
  keyCode: number;
174
177
  }
175
178
  /**
jquery/misc.d.ts CHANGED
@@ -677,6 +677,7 @@ declare namespace JQuery {
677
677
  'setRequestHeader' | 'status' | 'statusText'>,
678
678
  Partial<Pick<XMLHttpRequest, 'responseXML'>> {
679
679
  responseJSON?: any;
680
+ abort(statusText?: string): void;
680
681
 
681
682
  /**
682
683
  * Determine the current state of a Deferred object.
jquery/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/jquery",
3
- "version": "3.3.26",
3
+ "version": "3.3.30",
4
4
  "description": "TypeScript definitions for jquery",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -119,12 +119,13 @@
119
119
  "types": "index",
120
120
  "repository": {
121
121
  "type": "git",
122
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
122
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
123
+ "directory": "types/jquery"
123
124
  },
124
125
  "scripts": {},
125
126
  "dependencies": {
126
127
  "@types/sizzle": "*"
127
128
  },
128
- "typesPublisherContentHash": "ac57d550f483fffa47357a21d6a9f50f41173ebf46128f073cae707fc4ad82d8",
129
+ "typesPublisherContentHash": "df62dc4dca38a444be365d9e0268e088a19ae08d0a4464c56083e0aea9df2c54",
129
130
  "typeScriptVersion": "2.3"
130
131
  }