Definitelytyped: @types/connect typescript compiler broken with latest update (@types/[email protected])

Created on 17 Dec 2019  路  11Comments  路  Source: DefinitelyTyped/DefinitelyTyped

The latest typings for @types/connect package has broken typescript compiler.

The error:

node_modules/@types/connect/index.d.ts(21,42): error TS2689: 
Cannot extend an interface 'http.IncomingMessage'. 
Did you mean 'implements'?

The issue is with the following code highlighted in my comment in this PR:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/40776/files#diff-f3bffe5c90f627fc47cb16ad4369b62eR21

Problem is in @types/[email protected].

Most helpful comment

npm i @types/node@latest helped me.

All 11 comments

I have the same issue as well.

I also have the same issue too

Can we fix this ASAP

Thanks

Same issue. What version was this developed against?

Thank you!

Turns out we were using an older version of node @types where http.IncomingMessage was an interface. Upgrading node @types has fixed this issue.

May I know how did we resolve? I tried updating the @types/ connect andnode to latest still its failing for me. any help is much appreciated.

We just updated to the latest version of node typings we use node 10 so that worked fine

Then it worked as the types were now correct

thank you @Michael-Stock , i have the node version of v10.17.0 and npm 6.13.4 and @type/node :6.0.78 and still i have the issues.

Can you please share your version details.

I think your node @types are out of date you need 10.x version

I can't find out until I go to work tomorrow the exact version we are using

@Michael-Stock thank you for the help.

Just for reference we are now using node @types 10.17.2 and that fixed it

Previously we were using a 6.x version and we got that error

No problems :)

npm i @types/node@latest helped me.

Was this page helpful?
0 / 5 - 0 ratings