js-did icon indicating copy to clipboard operation
js-did copied to clipboard

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

Open vaultec81 opened this issue 9 months ago • 3 comments

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

vaultec81 avatar Oct 03 '23 03:10 vaultec81