The express app.get function gives the error "Argument types do not match parameters"
The following code ...
app.get('/basic', (req, res) => {
res.send({message: 'hello'})
})
generates a message Argument types do not match parametersin WebStorm 2016.2.4
The corresponding dependency section in mine is package.json:
"dependencies": {
"@types/body-parser": "0.0.32",
"@types/express": "^4.0.33",
"@types/lodash": "^4.14.34",
"@types/node": "^6.0.38",
"body-parser": "1.15.1",
"dotenv": "2.0.0",
"express": "4.13.4",
"lodash": "^4.13.1",
"typescript": "^2.0.3"
},
When I delete the package @types/express, WebStorm no longer gives an error message, but the TypeScript compiler gives a message error TS2307: Cannot find module 'express'.
Is there a way to set this up differently or is WebStorm just playing catch-up with TypeScript 2?
