ceramicnetwork / ceramicnetwork/js-did

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

Open
#170 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
103
Forks
29
PR merge metrics
No merged PRs in 30d

Description

# 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:

```typescript
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.