0
votes

I have tried to install the typings for angular and I am not sure what to do to fix the error. Any suggestion or help would be great!

Here is the error message:

ERROR in C:\Users\test\Desktop\ProjectTemplate\ProjectTemplate.Web\Content\node_modules\@types\angularjs\index.d.ts (1839,15): error TS2430: Interface 'IAugmentedJQuery' incorrectly extends interface 'JQuery'. Types of property 'find' are incompatible. Type '{ (selector: string): IAugmentedJQuery; (element: any): IAugmentedJQuery; (obj: JQuery): this; (selector: st...'. Type 'IAugmentedJQuery' is not assignable to type 'this'.

Here is my package.json:

{
  "name": "projecttemplate",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "webpack --config configs/webpack.config.js"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/angular": "^1.6.29",
    "@types/angularjs": "^1.5.14-alpha",
    "@types/jquery": "^3.2.11",
    "css-loader": "^0.28.5",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^0.11.2",
    "node-sass": "^4.5.3",
    "sass-loader": "^6.0.6",
    "style-loader": "^0.18.2",
    "ts-loader": "^2.3.3",
    "typescript": "^2.4.2",
    "typings": "^2.1.1",
    "webpack": "^3.5.5"
  },
  "dependencies": {
    "angular": "^1.6.6",
    "angular-route": "^1.6.6",
    "angular-ui-bootstrap": "^2.5.0",
    "bootstrap": "^3.3.7",
    "font-awesome": "^4.7.0",
    "jquery": "^3.2.1"
  }
}
1
I believe that the new versions of the jQuery typings for V3 included several breaking changes. The angular typings that augment jQuery have yet to be updated. - Aluan Haddad
@AluanHaddad oh i see. Okay I will downgrade to jQuery V2 then. Thanks - Ron

1 Answers

2
votes

Downgraded to jQuery typings v2 was the solution. The angular typings that augments jQuery have not been updated. Thank you for providing the solution @AluanHaddad