Commit Graph
164 Commits
Author SHA1 Message Date
FUJI Goro 9fa7394da1 [@types/jquery] fix: let jQuery's insertAfter / insertBefore accept Node and JQuery<Node> (#27404)
* fix: let jQuery's insertAfter / insertBefore accept JQuery<HTMLElement> as well as HTMLElement

* jquery now requires typescript 2.4

* fix jQuery dts to compile on TypeScript 2.3
2018-07-20 17:56:39 -07:00
Leonard Thieu 63867fb112 [jquery] offset can accept a partial Coordinates object. (#27437) 2018-07-20 13:31:21 +01:00
segayuu 1a07f27101 [@types/Bluebird] Make iterative methods rigid types without type parameters. (#27216)
* Resolve bluebird(Array) method

* upgrade typescript version from bluebird-global

* move testfile
Reason: There are too many type definition files
  depending on jquery and it can not be managed.

* upgrade typescript version from bluebird require packages

* fix lint error: use-default-type-parameter
2018-07-12 09:23:46 -07:00
Nathan Shively-Sanders 3c9c7fdacb Merge pull request #26674 from leonard-thieu/jquery/jquerystatic-type-parameter
[jquery] Remove type parameter from `JQueryStatic`
2018-06-19 12:46:05 -07:00
Leonard Thieu f3b10b2269 [jquery] Add tests to cover the changed APIs. 2018-06-19 13:56:49 -04:00
Leonard Thieu 9e427aa322 [jquery] Improve lint compliance. 2018-06-19 13:41:49 -04:00
Leonard Thieu 5af51abb91 [jquery] Remove type parameter from JQueryStatic.
The type parameter does not provide additional type safety. It also forced unnecessary type assertions in some usage scenarios.
2018-06-19 10:27:17 -04:00
Leonard Thieu 7591cf4318 Merge branch 'master' of https://github.com/DefinitelyTyped/DefinitelyTyped into jquery/deprecations
# Conflicts:
#	types/jquery/index.d.ts
2018-06-19 07:18:56 -04:00
Nathan Shively-Sanders 545210a449 Merge pull request #26452 from leonard-thieu/jquery/doc-links
[jquery] Fix documentation links for Visual Studio Code.
2018-06-18 14:28:22 -07:00
Nathan Shively-Sanders a4ac890e6e Merge pull request #26420 from leonard-thieu/jquery/bluebird-global
[jquery] Fix compatibility issue with `@types/bluebird-global`.
2018-06-18 14:14:22 -07:00
Holger Jeromin 07b8c88db9 removing type parameter inline 2018-06-18 14:49:44 +02:00
Holger Jeromin 0868c66683 fix build 2018-06-18 14:43:51 +02:00
Holger Jeromin 2003aafc56 Adding more tests 2018-06-18 11:44:28 +02:00
Leonard Thieu bac2d1db56 [jquery] Fix return types for JQuery.map, JQueryStatic.map, and JQueryStatic(). (#26524)
* [jquery] Fix return type of `JQuery.map`.

The type parameter of the JQuery object returned from `JQuery.map` depends on the return values of the callback. Previously, the type parameter was based on the object it was called on.

This fix requires dropping constraints on `JQuery`, `JQueryStatic`, `EventHandler`, and `EventHandlerBase` as `JQuery.map` may return `JQuery` objects that contain non-`Node` values.

* [jquery] Fix return type of `JQueryStatic.map`.

* [jquery] Declare type for `this` in callback for `JQueryStatic.map`.

* [jquery] Fix return type for `JQueryStatic()`.

* [bootstrap] Match change to `JQuery` interface.

* [flight] Fix test failure due to change in `@types/jquery`.

* [materialize-css] Fix test failure due to change in `@types/jquery`.

* [select2] Match changes to `@types/jquery` interfaces.

* [jquery] Fix error due to breaking change in TypeScript lib declarations.

(cherry picked from commit 2506245)
2018-06-17 23:02:23 +01:00
Leonard Thieu 97786c2536 [jquery] Fix error due to breaking change in TypeScript lib declarations.
(cherry picked from commit 2506245)
2018-06-17 14:32:21 -04:00
Leonard Thieu 62aca55d9a [jquery] Fix error due to breaking change in TypeScript lib declarations.
(cherry picked from commit 2506245)
2018-06-17 14:31:51 -04:00
Leonard Thieu 2506245210 [jquery] Fix error due to breaking change in TypeScript lib declarations. 2018-06-16 14:55:01 -04:00
Leonard Thieu 6f3dda7450 [jquery] Fix documentation links for Visual Studio Code. 2018-06-11 14:05:02 -04:00
Leonard Thieu 29f3a61db1 [jquery] Add guidance for deprecated APIs. 2018-06-11 13:30:47 -04:00
Leonard Thieu 83311151c9 [jquery] Fix compatibility issue with @types/bluebird-global.
`@types/jquery` used the global Promise interface to indicate compatibility with other Promise implementations. `@types/bluebird-global` modifies the global Promise interface making it unsafe to use.

To remedy this, a private copy of the global Promise interface is introduced.
2018-06-10 12:21:09 -04:00
Ron Buckton b8a9738dba Merge pull request #25795 from HolgerJeromin/documentfragment
[types/jQuery] add DocumentFragment to allowed jQuery objects
2018-05-16 17:02:24 -07:00
Holger Jeromin cda7bba75c asterisks fix 2018-05-16 11:47:48 +02:00
Holger Jeromin 7007542e78 adding JQueryEventObject to all on handlers and fix tests 2018-05-16 11:29:25 +02:00
Holger Jeromin b4fed84066 add DocumentFragement to allowed jQuery objects 2018-05-15 15:34:55 +02:00
Holger Jeromin 68b3a85dfe fixing trailing whitespace 2018-05-15 14:48:40 +02:00
Holger Jeromin c0c5afcf49 fixing tests 2018-05-15 14:39:13 +02:00
Holger Jeromin afbcc5cfe0 adding test 2018-05-15 14:20:56 +02:00
Holger Jeromin d1023531fa jquery: Add overload for on() handler 2018-05-15 12:32:27 +02:00
Andy 620ed4b696 jquery: Fix tests (#25422) 2018-04-30 19:09:12 +01:00
Armando Aguirre c5797de356 Merge pull request #23921 from O-Zone/master
Jquery: Added Window to selector_object_callback type so $(window) is possible
2018-03-08 16:06:54 -08:00
Armando Aguirre aca49836a0 Merge pull request #23833 from aluanhaddad/patch-2
fix import in window module test
2018-03-06 18:52:09 -08:00
Damian Senn 574ea0954e jQuery offset method might return undefined (#23821) 2018-02-26 11:47:25 -08:00
Hasse Feldthaus 0428c407f0 Update index.d.ts
Added Window to selector_object_callback type so $(window) is possible
2018-02-26 09:40:41 +01:00
Aluan Haddad 8acf1ae429 fix import in another test 2018-02-21 18:10:15 -05:00
Aluan Haddad 38f5479744 fix import in window module test 2018-02-21 18:01:41 -05:00
Andy Hanson 45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Andy bef4d2b27d Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Andy 37685e11dd Add tslint disables for no-const-enum (#23134) 2018-01-23 18:19:36 +00:00
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
Leonard Thieu 29c6e0f81a [jquery] Support projects without ES2015.Iterable. (#22766) 2018-01-14 06:12:35 +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 3f7bbeaa51 Miscellaneous lint fixes (#21116) 2017-10-30 11:05:43 -07:00
Andy 4e52c4dea6 jquery: Fix lint (#20965) 2017-10-30 07:55:19 -07:00
Andy 19f89399e4 Ensure every package has a tslint.json (#21009)
* Ensure every package has a tslint.json

* Fixes
2017-10-25 11:13:50 -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
Andy 947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Nathan Shively-Sanders 32ae9f623b Fix test failures 2017-10-03 13:43:36 -07:00
Nathan Shively-Sanders b8ea87c68e Strict function variance fixes round 1 2017-10-02 15:50:34 -07:00
Andy 924fafffc0 Fix remaining lint errors (#19166) 2017-08-20 15:37:53 -07:00