-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add types #60
chore: add types #60
Conversation
Needs a bit of sanity checking as this datastore appears to require `Uint8Arrays` as keys when every other datastore takes `Keys` as keys. Does not type the tests because they use lots of libp2p primitives and the types there need a bit of work still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this datastore really shouldn’t be called datastore but as far as types goes looks good
Marked this as a draft as I'm going to integrate it with js-ipfs as a branch then circle back here and make sure the types reflect actual usage. |
This should be consistent with the DHT API. Perhaps the docs are the problem here, however this also is part of a TieredDatastore |
In IPFS we pass in the This module was passing the message handler as the second argument to I've updated the code and tests to use the |
@achingbrain could we do the same thing in |
Yes, I think so - it would be a case of doing something similar to that adapter in IPFS so we can keep the same external API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FYI, I will be opening an issue to figure out the inconsistencies on datastore interface/dht for this repo , so that we track that
Needs a bit of sanity checking as this datastore appears to require
Uint8Arrays
as keys when every other datastore takesKeys
as keys.Does not type the tests because they use lots of libp2p primitives
and the types there need a bit of work still.