-
Notifications
You must be signed in to change notification settings - Fork 7
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
Typing doesn't work with npm:@deno/kv
#185
Comments
npm:@deno/kv
in Deno.npm:@deno/kv
in Deno.
npm:@deno/kv
in Deno.npm:@deno/kv
I have been experimenting with the npm package to see if I could figure out compatibility with Node, and wasn't sure how to do it. This is a really good suggestion, I will see if I can fix this issue and make it work. |
Sadly at this time, it seems the types from the NPM package and the native Deno.Kv types aren't consistent enough to actually make it cross-platform compatible. I tried moving over to using the types from npm:@deno/kv, but this still caused issues when trying to use a Deno.Kv instance with kvdex. As long as this is the case I will be prioritizing native compatibility, and hopefully we will see an improvement on this front in the future with a stable release of Deno KV. |
Opps, didnt mean to close the issue, we can keep this open until there is some solution. |
This should now have been fixed as of #205 and release 1.0.0. |
Okay, so if you use
npm:@deno/kv
in Deno, the NPM package is set up to redirect toDeno.kv
if it is defined, making it viable to usenpm:@dneo/kv
in Deno. However, when I pass aKv
instance fromnpm:@deno/kv
into kvdex in Deno, I get a type error:I assume this is simply because the NPM package is more of a stable release than
Deno.kv
. A possible solution is to just change all instances of theDeno.Kv
type to{ Kv } from "npm:@deno/kv"
The text was updated successfully, but these errors were encountered: