Files
DefinitelyTyped/types/jquery/tslint.json
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

38 lines
1.2 KiB
JSON

{
"extends": "dtslint/dt.json",
"rules": {
// All are TODOs
"await-promise": false,
"ban-types": false,
"callable-types": false,
"interface-name": false,
"no-any-union": false,
"no-arg": false,
"no-boolean-literal-compare": false,
"no-const-enum": false,
"no-declare-current-package": false,
"no-empty-interface": false,
"no-misused-new": false,
"no-object-literal-type-assertion": false,
"no-redundant-jsdoc-2": false,
"no-unnecessary-generics": false,
"no-unnecessary-qualifier": false,
"no-unnecessary-type-assertion": false,
"no-var": false,
"no-var-keyword": false,
"object-literal-key-quotes": false,
"object-literal-shorthand": false,
"one-variable-per-declaration": false,
"only-arrow-functions": false,
"prefer-conditional-expression": false,
"prefer-const": false,
"prefer-for-of": false,
"prefer-switch": false,
"prefer-template": false,
"space-before-function-paren": false,
"space-within-parens": false,
"triple-equals": false,
"use-default-type-parameter": false
}
}