Commit Graph

62 Commits

Author SHA1 Message Date
Leonard Thieu
32a23a8139 [jquery] Update to jQuery 3.3. (#23095)
* [jquery] .addClass(), .removeClass(), and .toggleClass() methods now accept an array of classes.

* [jquery] Add test for overload of .toggleClass().

* [jquery] Add jQuery 3.3 deprecations.
2018-01-21 20:00:14 +00:00
icnocop
1e7989f8ce [jquery] Overriding the beforeSend function for AjaxSettings and UrlAjaxSettings to indicate a more appropriate settings parameter type
Fixed errors when running lint
2017-11-29 18:30:41 -08:00
Andy
4e52c4dea6
jquery: Fix lint (#20965) 2017-10-30 07:55:19 -07:00
Leonard Thieu
fdd6cc3a35 [jquery] after(), append(), before(), and prepend() can accept an array of JQuery (#20319)
* [jquery] `after()`, `append()`, `before()`, and `prepend()` can accept an array of JQuery.

* [jquery] Lint.

* [jquery] Disable flaky tests.

* [sharepoint] Lint.

* [tinymce] Lint.

* [ej.web.all] Lint.

* [jquery] Fix unintended change to Callbacks.

* [jquery] Fix test.
2017-10-17 09:26:14 -07:00
Leonard Thieu
42cf3abe63 [jquery] Add ajaxSettings property. (#20433) 2017-10-16 11:32:07 -07:00
Nathan Shively-Sanders
32ae9f623b Fix test failures 2017-10-03 13:43:36 -07:00
John Reilly
44a9d083d4 Merge pull request #18638 from leonard-thieu/jquery-promise
[jquery] Improve compatibility between Promise types
2017-08-20 13:38:06 +01:00
Andy
5d6c651a1a Apply stricter lint rules (#19063) 2017-08-17 14:53:41 -07:00
Leonard Thieu
f13a191e66 [jquery] Improve compatibility between Promise types.
Add `pipe(null, null, progressFilter)` overload.
2017-08-09 11:32:01 -04:00
Leonard Thieu
a6644cb39b [jquery] Make JQuery.Promise and JQuery.Promise3 compatible with Promise. 2017-08-04 11:40:52 -04:00
Leonard Thieu
28022c0fe8 [jquery] after(), append(), before(), and prepend() should accept JQuery<JQuery.Node>. 2017-08-04 10:52:39 -04:00
Andy
11fab3226b Fix jquery promise compatibility with async functions (#18421) 2017-07-27 07:54:12 -07:00
Leonard Thieu
ec2158f2d6 [jquery] Add tests for type of a type guard in the not case.
Note that isPlainObject() fails the not case in the same manner that isEmptyObject() does. This might warrant changing it to return a boolean. However, unlike isEmptyObject(), isPlainObject() can be useful when the object is a plain object.
2017-07-18 09:22:02 -04:00
Leonard Thieu
226ef5f14c [jquery] Revert isEmptyObject() to returning boolean.
While the type guard does narrow a value's type to an empty object, the interesting case is when the type is not an empty object. TypeScript narrows the type to never in that case which makes the type guard not very useful.
2017-07-18 09:13:58 -04:00
Leonard Thieu
8c92375cfd [jquery] Fix PromiseLike compatibility for Promise3, Promise2, and jqXHR. 2017-07-12 20:07:43 -04:00
Leonard Thieu
c0be2168e3 [jquery] Fix event handler types.
The type of `this` for event handlers can now be specified using the new type `EventHandlerBase`. Event-related methods have been updated to accept `EventHandlerBase`.

Event handlers with non-default TData can now be unbound.
2017-07-11 11:59:58 -04:00
Leonard Thieu
263ecda463 [jquery] Improve declaration of proxy().
Return a specific function type instead of Function.
Add support for passing null/undefined for context.
2017-07-11 11:20:18 -04:00
Leonard Thieu
c7393ce546 [jquery] Fix tests. 2017-07-11 11:20:16 -04:00
Leonard Thieu
1c6c4aaf5b [jquery] scrollLeft() and scrollTop() can also return undefined.
scrollLeft() and scrollTop() will return undefined when used on an empty set.
2017-07-11 11:20:15 -04:00
Leonard Thieu
f5fd92f7b3 [jquery] Formatting.
Move JQueryStatic above JQuery for consistency.
2017-07-11 11:20:14 -04:00
Leonard Thieu
e5bce784ca [jquery] Fix uncaught test errors. 2017-07-02 10:28:55 -04:00
Leonard Thieu
a6134ee5a1 [jquery] Remove support for multiple multi-argument Promises from when(). 2017-06-28 13:28:42 -04:00
Leonard Thieu
306806e121 [jquery] More tests. 2017-06-28 09:01:38 -04:00
Leonard Thieu
9dee232fbe [jquery] Formatting. 2017-06-28 08:16:31 -04:00
Leonard Thieu
db5a6f4bc4 [jquery] Formatting. 2017-06-27 19:08:27 -04:00
Leonard Thieu
c735b73233 [jquery] Fix Promise and Deferred.
Fix when() ordering.
2017-06-27 18:16:04 -04:00
Leonard Thieu
d03b2b9ad5 [jquery] Change Promise2 to extend from Promise3. 2017-06-27 17:57:35 -04:00
Leonard Thieu
d2a6dc64c0 [jquery] Revise Promise3. 2017-06-27 17:53:13 -04:00
Leonard Thieu
8ec10d94be [jquery] No null. 2017-06-27 08:12:06 -04:00
Leonard Thieu
11f6048075 [jquery] Fix typo that broke a bunch of tests. 2017-06-27 05:58:11 -04:00
Leonard Thieu
0c09fd187c Merge branch 'master' of https://github.com/DefinitelyTyped/DefinitelyTyped into jquery 2017-06-26 18:30:49 -04:00
Leonard Thieu
a0426430da [jquery] Clean up promises. 2017-06-26 17:22:06 -04:00
Leonard Thieu
6fa5e4bc98 [jquery] Make isEmptyObject() a user-defined type guard. 2017-06-26 12:57:00 -04:00
Leonard Thieu
c6ba2a6276 [jquery] Allow writing through index signature on JQuery. 2017-06-26 11:42:19 -04:00
Leonard Thieu
79746b4182 [jquery] when() does not emit progress notifications. 2017-06-26 09:19:18 -04:00
Leonard Thieu
b986d024e1 [jquery] Add Deferred.exceptionHook. 2017-06-26 08:16:18 -04:00
Leonard Thieu
2ff6e2cad4 [jquery] offset() can return undefined on empty sets. 2017-06-26 08:00:00 -04:00
Diogo Franco (Kovensky)
c77f43d7e9 jquery: Update test annotation 2017-06-26 17:58:28 +09:00
Leonard Thieu
8532f27673 [jquery] Add more tests for JQueryStatic.when(). 2017-06-25 17:07:59 -04:00
Leonard Thieu
85c09b5387 [jquery] Add Promise type that supports 2 parameters. 2017-06-25 15:31:35 -04:00
Leonard Thieu
22d76950f9 [jquery] Add Promise type that supports 3 parameters. 2017-06-25 13:52:07 -04:00
Leonard Thieu
869c4ba560 [jquery] Refactor Event.
Static members moved to a separate type.
Removed originalTarget property.
2017-06-24 12:57:14 -04:00
Leonard Thieu
9c7cc11356 [jquery] Add tests for Callbacks. 2017-06-24 12:10:50 -04:00
Leonard Thieu
f17d785e96 [jquery] Fix jqXHR, Deferred, and Promise. 2017-06-24 11:32:48 -04:00
Leonard Thieu
725f7676c5 [jquery] Add more tests for JQueryStatic. 2017-06-24 09:14:00 -04:00
Leonard Thieu
4c54d08d3c [jquery] Allow passing output of $.parseHTML() directly to manipulation methods. 2017-06-23 14:57:03 -04:00
Leonard Thieu
9e58690bda [jquery] Clean up AjaxSettings.
Add tests for AjaxSettings.
2017-06-23 14:02:14 -04:00
Leonard Thieu
a6390aea00 [jquery] Clean up methods on JQueryStatic.
Add tests for methods on JQueryStatic.
2017-06-23 12:31:10 -04:00
Leonard Thieu
40e4a08d66 [jquery] Clean up misc-related methods on JQuery.
Add tests for misc-related methods on JQuery.
2017-06-21 20:30:39 -04:00
Leonard Thieu
798ce5ea69 [jquery] Clean up manipulation-, queue-, and traversing-related methods on JQuery.
Add tests for manipulation-, queue-, and traversing-related methods on JQuery.
2017-06-21 20:15:53 -04:00