nulab / backlog-js

Backlog API version 2 client for browser and node.
https://developer.nulab-inc.com/docs/backlog/
33 stars 13 forks source link

Cannot find name 'IResponse'. on TypeScript compile #7

Closed toshimaru closed 4 years ago

toshimaru commented 4 years ago

I'm trying to use backlog-js in TypeScript project.

When I run tsc, I get an error:

node_modules/backlog-js/dist/backlog.d.ts:20:19 - error TS2304: Cannot find name 'IResponse'.

20       }): Promise<IResponse>;

How can I resolve this issue?

vvatanabe commented 4 years ago

@toshimaru I' not sure what the cause is. I will chk it.

toshimaru commented 4 years ago

I’ve found what causes the issue. There are two main reasons:

  1. I was using TypeScript 4
  2. I was using @types/isomorphic-fetch (which removes IResponse interface)

Related PR: #3 (This PR implements IResponse)

vvatanabe commented 4 years ago

@toshimaru Thanks for investigating into the issue!

toshimaru commented 4 years ago

This issue has been fixed on v0.10.0! 👍