@types/jquery 3.3.36 → 3.5.1

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
@@ -4135,7 +4135,7 @@ $( "p" )
4135
4135
  */
4136
4136
  find<K extends keyof HTMLElementTagNameMap>(selector_element: K | JQuery<K>): JQuery<HTMLElementTagNameMap[K]>;
4137
4137
  find<K extends keyof SVGElementTagNameMap>(selector_element: K | JQuery<K>): JQuery<SVGElementTagNameMap[K]>;
4138
- find<E extends Element>(selector_element: JQuery.Selector | E | JQuery<E>): JQuery<E>;
4138
+ find<E extends HTMLElement>(selector_element: JQuery.Selector | Element | E | JQuery<E>): JQuery<E>;
4139
4139
  /**
4140
4140
  * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
4141
4141
  * @param queue The name of the queue in which to stop animations.
@@ -6167,6 +6167,81 @@ $( "p span" ).last().addClass( "highlight" );
6167
6167
  ```
6168
6168
  */
6169
6169
  last(): this;
6170
+
6171
+ /**
6172
+ * Reduce the set of matched elements to the even ones in the set, numbered from zero.
6173
+ * @see \`{@link https://api.jquery.com/even/ }\`
6174
+ * @since 3.5
6175
+ * @example ​ ````Highlight the even items in a list.
6176
+ ```html
6177
+ <!doctype html>
6178
+ <html lang="en">
6179
+ <head>
6180
+ <meta charset="utf-8">
6181
+ <title>even demo</title>
6182
+ <style>
6183
+ .highlight {
6184
+ background-color: yellow;
6185
+ }
6186
+ </style>
6187
+ <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
6188
+ </head>
6189
+ <body>
6190
+
6191
+ <ul>
6192
+ <li>Look:</li>
6193
+ <li>This is some text in a list.</li>
6194
+ <li>This is a note about it.</li>
6195
+ <li>This is another note about it.</li>
6196
+ </ul>
6197
+
6198
+ <script>
6199
+ $( "ul li" ).even().addClass( "highlight" );
6200
+ </script>
6201
+
6202
+ </body>
6203
+ </html>
6204
+ ```
6205
+ */
6206
+ even(): this;
6207
+
6208
+ /**
6209
+ * Reduce the set of matched elements to the odd ones in the set, numbered from zero.
6210
+ * @see \`{@link https://api.jquery.com/odd/ }\`
6211
+ * @since 3.5
6212
+ * @example ​ ````Highlight the odd items in a list.
6213
+ ```html
6214
+ <!doctype html>
6215
+ <html lang="en">
6216
+ <head>
6217
+ <meta charset="utf-8">
6218
+ <title>odd demo</title>
6219
+ <style>
6220
+ .highlight {
6221
+ background-color: yellow;
6222
+ }
6223
+ </style>
6224
+ <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
6225
+ </head>
6226
+ <body>
6227
+
6228
+ <ul>
6229
+ <li>Look:</li>
6230
+ <li>This is some text in a list.</li>
6231
+ <li>This is a note about it.</li>
6232
+ <li>This is another note about it.</li>
6233
+ </ul>
6234
+
6235
+ <script>
6236
+ $( "ul li" ).odd().addClass( "highlight" );
6237
+ </script>
6238
+
6239
+ </body>
6240
+ </html>
6241
+ ```
6242
+ */
6243
+ odd(): this;
6244
+
6170
6245
  /**
6171
6246
  * Load data from the server and place the returned HTML into the matched element.
6172
6247
  * @param url A string containing the URL to which the request is sent.
jquery/README.md CHANGED
@@ -8,7 +8,7 @@ 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: Mon, 27 Apr 2020 15:20:55 GMT
11
+ * Last updated: Wed, 29 Jul 2020 15:36:30 GMT
12
12
  * Dependencies: [@types/sizzle](https://npmjs.com/package/@types/sizzle)
13
13
  * Global values: `$`, `Symbol`, `jQuery`
14
14
 
jquery/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for jquery 3.3
1
+ // Type definitions for jquery 3.5
2
2
  // Project: https://jquery.com
3
3
  // Definitions by: Leonard Thieu <https://github.com/leonard-thieu>
4
4
  // Boris Yankov <https://github.com/borisyankov>
jquery/misc.d.ts CHANGED
@@ -1160,29 +1160,6 @@ callbacks.fire( "world" );
1160
1160
  */
1161
1161
  interface Thenable<T> extends PromiseLike<T> { }
1162
1162
 
1163
- // NOTE: This is a private copy of the global Promise interface. It is used by JQuery.PromiseBase to indicate compatibility with other Promise implementations.
1164
- // The global Promise interface cannot be used directly as it may be modified, as in the case of @types/bluebird-global.
1165
- /**
1166
- * Represents the completion of an asynchronous operation
1167
- */
1168
- interface _Promise<T> {
1169
- readonly [Symbol.toStringTag]: "Promise";
1170
- /**
1171
- * Attaches callbacks for the resolution and/or rejection of the Promise.
1172
- * @param onfulfilled The callback to execute when the Promise is resolved.
1173
- * @param onrejected The callback to execute when the Promise is rejected.
1174
- * @returns A Promise for the completion of which ever callback is executed.
1175
- */
1176
- then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
1177
- onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): _Promise<TResult1 | TResult2>;
1178
- /**
1179
- * Attaches a callback for only the rejection of the Promise.
1180
- * @param onrejected The callback to execute when the Promise is rejected.
1181
- * @returns A Promise for the completion of the callback.
1182
- */
1183
- catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): _Promise<T | TResult>;
1184
- }
1185
-
1186
1163
  // Type parameter guide
1187
1164
  // --------------------
1188
1165
  // Each type parameter represents a parameter in one of the three possible callbacks.
@@ -1205,7 +1182,7 @@ callbacks.fire( "world" );
1205
1182
  interface PromiseBase<TR, TJ, TN,
1206
1183
  UR, UJ, UN,
1207
1184
  VR, VJ, VN,
1208
- SR, SJ, SN> extends _Promise<TR>, PromiseLike<TR> {
1185
+ SR, SJ, SN> {
1209
1186
  /**
1210
1187
  * Add handlers to be called when the Deferred object is either resolved or rejected.
1211
1188
  * @param alwaysCallback A function, or array of functions, that is called when the Deferred is resolved or rejected.
@@ -4187,7 +4164,6 @@ $( document ).on( "mousemove", function( event ) {
4187
4164
  * For key or mouse events, this property indicates the specific key or button that was pressed.
4188
4165
  * @see \`{@link https://api.jquery.com/event.which/ }\`
4189
4166
  * @since 1.1.3
4190
- * @deprecated ​ Deprecated since 3.3. See \`{@link https://github.com/jquery/api.jquery.com/issues/821 }\`.
4191
4167
  * @example ​ ````Log which key was depressed.
4192
4168
  ```html
4193
4169
  <!doctype html>
jquery/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/jquery",
3
- "version": "3.3.36",
3
+ "version": "3.5.1",
4
4
  "description": "TypeScript definitions for jquery",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -131,6 +131,6 @@
131
131
  "dependencies": {
132
132
  "@types/sizzle": "*"
133
133
  },
134
- "typesPublisherContentHash": "7eacd0893725c8a45244cffd61d925b1805bed9f41b8152633b4826872abfc3e",
135
- "typeScriptVersion": "2.8"
134
+ "typesPublisherContentHash": "bbea2d30c44e1d96e4164fda5e19905190af2fda36b978503665f2d9b20c0926",
135
+ "typeScriptVersion": "3.0"
136
136
  }