Skip to content
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

Type 'ResolverRegistry' is not assignable to type 'Resolver | ResolverRegistry | undefined'. #170

Open
vaultec81 opened this issue Oct 3, 2023 · 3 comments

Comments

@vaultec81
Copy link

Description

Seems types are invalid between what's required by js-did and what's produced by key-did-resolver. I am not sure if this issue is only on my machine or not. I was able to bypass by doing as any to prevent the type checker for looking any further

Technical Information

test/util/get-test-ceramic-client.function.ts:9:25 - error TS2322: Type 'ResolverRegistry' is not assignable to type 'Resolver | ResolverRegistry | undefined'.
  Type 'ResolverRegistry' is missing the following properties from type 'Resolver': registry, cache, resolve

9   const did = new DID({ resolver: KeyResolver.getResolver() })

StackTrace
Example:

import * as KeyResolver from 'key-did-resolver'
import { DID } from 'dids'

const did = new DID({ resolver: KeyResolver.getResolver() })

package.json

"key-did-resolver": "^3.0.0",
"dids": "^4.0.4"

Full usage
https://github.com/spknetwork/spk-graph-client/blob/main/test/util/get-test-ceramic-client.function.ts

@oed
Copy link
Member

oed commented Oct 3, 2023

I'm unable to reproduce the issue locally using the example in your post.

However, it looks like your repo is on an old version of key-did-resolver:
https://github.com/spknetwork/spk-graph-client/blob/main/package.json#L44

@vaultec81
Copy link
Author

@oed I upgraded everything to latest on my local branch as shown above. I'll double check to make sure it installed correctly and any other conflict points.

@oed
Copy link
Member

oed commented Oct 5, 2023

@vaultec81 I tried the example code snippet you provided in OP in a clean repo and it worked for me. So I suspect maybe you have multiple versions of some package installed perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants