orbit-db-types
orbit-db-types copied to clipboard
Replace dependency on community IPFS types with new ipfs-core-types
hi! 👋
I encountered issue #29 and thought I would attempt to help.
Disclaimer:
- I don't consider myself a Node / JS or TS developer
- I have no more than a few hours of experience with IPFS and OrbitDB
The problem:
IPFS type from git+https://github.com/lukas2005/types-ipfs.git
don't match the types employed by the more recent ipfs-core-types
package. This package seems to be the new way of working, at least for ipfs-http-client.
The fix:
- [x] Replace references to
@types/ipfs
withipfs-core-types
- [x] Store.d.ts - TS error:
Cannot find name 'IReplicationStatus'.
. This seems to be fixed by adding a reference path. I don't understand the details of what it does, but I see a similar usage in OrbitDB.d.ts, so I guess it's okay? :) - [ ] Verify that this massive package.json diff is a desirable one <- Question to you :) (I was under the impression that we don't check in package.json for libraries)
- [ ] OrbitDB.d.ts - TS error:
Cannot find module 'orbit-db-cache' or its corresponding type declarations.
. My intuition here is that we shouldn't use this git dependency on OrbitDB, but have a release cycle for the types that aligns with the releases of OrbitDB. I could be entirely wrong here though. Also not sure whether that should be fixed in this PR
Feedback much appreciated! :)