Skip to content

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

@vaultec81

Description

@vaultec81

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions