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

[bug] private member registry leads to typescript compiler errors #109

Closed
mirceanis opened this issue Dec 9, 2021 · 1 comment · Fixed by #110
Closed

[bug] private member registry leads to typescript compiler errors #109

mirceanis opened this issue Dec 9, 2021 · 1 comment · Fixed by #110
Assignees
Labels
enhancement New feature or request released

Comments

@mirceanis
Copy link
Member

In a project with complex dependency tree it can happen that there are 2 or more versions of did-resolver in use.
The class Resolver has a private registry member, which leads to broken builds when it is imported from different versions of the library.

Argument of type '{ [x: string]: DIDResolver | DIDResolver; }' is not assignable to parameter of type 'ResolverRegistry'.
'string' index signatures are incompatible.
  Type 'DIDResolver | DIDResolver' is not assignable to type 'DIDResolver'.
    Type 'import("..../node_modules/did-resolver/lib/resolver").DIDResolver' is not assignable to type 'import("..../node_modules/did-resolver/lib/resolver").DIDResolver'.
      Types of parameters 'resolver' and 'resolver' are incompatible.
        Type 'import("..../node_modules/did-resolver/lib/resolver").Resolver' is not assignable to type 'import("..../node_modules/did-resolver/lib/resolver").Resolver'.
          Types have separate declarations of a private property 'registry'.

I believe this could be fixed by avoiding the use of class Resolver as a type in other definitions.

@mirceanis mirceanis added the enhancement New feature or request label Dec 9, 2021
@mirceanis mirceanis self-assigned this Dec 9, 2021
mirceanis added a commit that referenced this issue Dec 9, 2021
uport-automation-bot pushed a commit that referenced this issue Dec 9, 2021
## [3.1.5](3.1.4...3.1.5) (2021-12-09)

### Bug Fixes

* use Resolvable as type instead of Resolver ([#110](#110)) ([35c4d67](35c4d67)), closes [#109](#109)
@uport-automation-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 3.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants