ethanent / phin

Node HTTP client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find name WithData and IWithForm. In types.d.ts

Kristalkill opened this issue · comments

On line 27,28 2 errors:
TS2304: Cannot find name 'IWithData'.
TS2304: Cannot find name 'IWithForm'.
Fixed with changing IWithData to phin.IWithData and IWithForm to phin.IWithForm

commented

I came here because i noticed the same thing.
PRs havent been accepted for a few months so its probably not useful if i created one now.
@ethanent Can you please pay some attention to this library again? Should be warranted with 1mil+ weekly downloads.

Same issue here:
image

Looks like this would be fixed in #67.. if it ever gets merged. In the meantime, if you want to use this package in an Typescript project you can install that commit directly:

npm rm phin
npm i 'github:jdforsythe/phin#8c8e369723e290c64c16e18608c994171157e841'

Looks like this would be fixed in #67.. if it ever gets merged. In the meantime, if you want to use this package in an Typescript project you can install that commit directly:

npm rm phin
npm i 'github:jdforsythe/phin#8c8e369723e290c64c16e18608c994171157e841'

Ah, that's really helpful, thanks

#67 has been merged and the branch was deleted so now you may be getting an error like this:

npm ERR! code 128
npm ERR! Command failed: git checkout 8c8e369723e290c64c16e18608c994171157e841
npm ERR! fatal: reference is not a tree: 8c8e369723e290c64c16e18608c994171157e841
npm ERR! 

The merge hasn't been published on NPM but you can reference the main phin repo:

npm rm phin
npm i 'github:ethanent/phin#79de890f000303d1e1619d6ac4714b61a10dcb18'

If you prefer to just stick with the master branch for simplicity you can substite the commit-specific line with

npm i github:ethanent/phin

I believe this is fixed in 3.6.1