Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

ipfs-http-client method arguments and return types are any #3451

Closed
dapplion opened this issue Dec 16, 2020 · 5 comments
Closed

ipfs-http-client method arguments and return types are any #3451

dapplion opened this issue Dec 16, 2020 · 5 comments
Labels
kind/bug A bug in existing code (including security flaws) status/in-progress In progress

Comments

@dapplion
Copy link

dapplion commented Dec 16, 2020

Curent

All ipfs methods arguments and return types are any. See below example for add

ezgif com-gif-maker

Expect

Arguments and return values to be types properly


"ipfs-http-client": "^48.1.2",
"typescript": "^3.8.0",
Visual Studio Code: October 2020 (version 1.51)
@dapplion dapplion added the need/triage Needs initial labeling and prioritization label Dec 16, 2020
@achingbrain achingbrain added kind/bug A bug in existing code (including security flaws) status/ready Ready to be worked and removed need/triage Needs initial labeling and prioritization labels Dec 17, 2020
@achingbrain
Copy link
Member

Please can you try with the latest RC? The core-api is now fully entyped in the ipfs-core-types module and ipfs-http-client now implements that API:

$ npm install ipfs-http-client@next

image

@achingbrain achingbrain added status/in-progress In progress and removed status/ready Ready to be worked labels Apr 1, 2021
@dapplion
Copy link
Author

dapplion commented Apr 1, 2021

Screenshot from 2021-04-01 16-20-52

Now has some types but first argument is still any.

With this version installed

  "name": "ipfs-http-client",
  "version": "49.0.5-rc.3+1823375a"

Hey you could try this new project called Typescript, it has a solid type system with good tooling and community.

@achingbrain
Copy link
Member

Now has some types but first argument is still any.

Hmm, weird that it's picked up some of the types but not everything.

Hey you could try this new project called Typescript, it has a solid type system with good tooling and community.

I appreciate that you feel frustration over this issue but this sort of comment is not massively helpful.

@dapplion
Copy link
Author

dapplion commented Apr 1, 2021

I appreciate that you feel frustration over this issue but this sort of comment is not massively helpful.

I'm sorry to be perceived as negative but I do feel the frustration over the quality of the types in all of protocol lab's JS libs, from IPFS, to libp2p, to utils. I know I'm beating a dead horse now, but I do want to see the JS side succeed. I really wish you could see the return on investment on such a move.

@lidel
Copy link
Member

lidel commented Apr 12, 2021

Should be fixed soon as part of #2945
Closing to decrease noise.

@lidel lidel closed this as completed Apr 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws) status/in-progress In progress
Projects
None yet
Development

No branches or pull requests

3 participants