@types/request-promise package and had problems.Definitions by: in index.d.ts) so they can respond.Currently I can't use `@types/request-promise because it gives a compiler error!
Error at node_modules/@types/request-promise/index.d.ts:13:15: Interface 'RequestPromise' cannot simultaneously extend types 'Request' and 'Bluebird<any>'.
Named property 'toJSON' of types 'Request' and 'Bluebird<any>' are not identical.
Could you check the versions of the packages you're using? For @types/request-promise and @types/bluebird and @types/request. Also try with typescript@next.
I'm having the same error since this morning. Package versions:
@types/[email protected]
@types/[email protected]
@types/[email protected]
Tried with typescript@next, same results.
In file types/bluebird/index.d.ts change the line:
toJSON(): Object;
to
toJSON(): object;
I think you mean in file types/request/index.d.ts
Updating @types/request to 2.0.6 solves it.
EDIT: I also needed to update @types/bluebird to 3.5.16. It's seems that both packages had the definition toJSON(): Object; and at some point they moved to toJSON(): object;
I can confirm that with @types/[email protected] and @types/[email protected] it works now also for me. And after tinkering manually I can confirm that at least one of the causes was toJSON(): Object; not being toJSON(): object;.
Turns out I didn't have @types/bluebird installed (at least not directly). Installing it bumped @types/request to the required version and everything started working. I'm gonna close this :+1:
Most helpful comment
I can confirm that with
@types/[email protected]and@types/[email protected]it works now also for me. And after tinkering manually I can confirm that at least one of the causes wastoJSON(): Object;not beingtoJSON(): object;.