@types/express-serve-static-coreWhen I execute the command tsc, I get the following error:
node_modules/@types/express-serve-static-core/index.d.ts(177,11): error TS2430: Interface 'Request' incorrectly extends interface 'IncomingMessage'.
Types of property 'headers' are incompatible.
Type '{ [key: string]: string | undefined; }' is not assignable to type '{ [key: string]: string | string[]; }'.
Index signatures are incompatible.
Type 'string | undefined' is not assignable to type 'string | string[]'.
Type 'undefined' is not assignable to type 'string | string[]'.
The last time there were no such issues was 20 days ago, when the command tsc ran successfully.
Here is a snippet of my package.json file:
{
"devDependencies": {
"@types/body-parser": "^1.16.3",
"@types/chai": "^3.5.2",
"@types/express": "^4.0.36",
"@types/mocha": "^2.2.41",
"chai": "^3.5.0",
"concurrently": "^3.4.0",
"mocha": "^3.4.1",
"nodemon": "^1.11.0",
"tslint": "^5.2.0",
"typescript": "^2.3.2"
},
"dependencies": {
"@types/body-parser": "^1.16.3",
"@types/node": "^7.0.31",
"body-parser": "^1.17.2",
"express": "^4.15.3"
}
}
Happened somewhere between these versions:
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ¬ @types/[email protected]
β βββ @types/[email protected]
β βββ¬ @types/[email protected]
β βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ¬ @types/[email protected]
β βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ¬ @types/[email protected]
β βββ @types/[email protected]
β βββ¬ @types/[email protected]
β βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ @types/[email protected]
βββ¬ @types/[email protected]
β βββ @types/[email protected]
βββ @types/[email protected]
Likely @types/[email protected] -> @types/[email protected]
Awesome! Works now! Thank you so much for the fix!
Cheers,
Suresh Gururajan
Could anyone please link to the fixing commit? @sureshgururajan
@sompylasar - Thank you for referencing it.
Most helpful comment
https://github.com/DefinitelyTyped/DefinitelyTyped/commit/c9e01b3e760ee7e2f93a7c9052d432f6713347c8#diff-7d84e08967cded0b99ed4328aab0a1a8R811
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/16705