Definitelytyped: @types/jqlite: Minor version broke compatibility with @types/jquery

Created on 28 Dec 2018  路  3Comments  路  Source: DefinitelyTyped/DefinitelyTyped

This commit created a TypeScript error when used together with jQuery.

https://github.com/DefinitelyTyped/DefinitelyTyped/commit/45903423f3d11c85f16a83771a85b1312dbb9350#diff-fa0930f1e24e0602511bb3207034d60c

```
node_modules/@types/jquery/index.d.ts:8186:5 - error TS2717: Subsequent property declarations must have the same type. Property 'char' must be of type 'string', but here has type 'any'.

8186 char: any;
~~~~

node_modules/@types/jquery/index.d.ts:8188:5 - error TS2717: Subsequent property declarations must have the same type. Property 'key' must be of type 'string', but here has type 'any'.

8188 key: any;
````

Most helpful comment

You can install the version of @types/jquery before the commit that changed char from any to string, which was published in version 3.3.28.

"@types/jquery": "<3.3.28",

All 3 comments

Note: this issue was due to @types/angular-mocks having a dependency on @types/angular version "*", which meant that @types/angular-mocks caused angular to be installed with a new minor version, so this probably isn't a bug for jqlite or jquery.

You can install the version of @types/jquery before the commit that changed char from any to string, which was published in version 3.3.28.

"@types/jquery": "<3.3.28",

I got the same error when using AngularJS 1. Solved by install @types/angular 1.6.52

Was this page helpful?
0 / 5 - 0 ratings

Related issues

demisx picture demisx  路  3Comments

lilling picture lilling  路  3Comments

JudeAlquiza picture JudeAlquiza  路  3Comments

JWT
svipas picture svipas  路  3Comments

Loghorn picture Loghorn  路  3Comments