ethanent / phin

Node HTTP client
MIT License
576 stars 33 forks source link

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

Open Kristalkill opened 3 years ago

Kristalkill commented 3 years ago

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

leumasme commented 3 years ago

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.

ThatTonybo commented 3 years ago

Same issue here: image

Sleavely commented 3 years ago

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'
ThatTonybo commented 3 years ago

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

Sleavely commented 3 years ago

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
XuluWarrior commented 10 months ago

I believe this is fixed in 3.6.1