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

fix: Repair type error with BaseProvider::request #23

Merged
merged 1 commit into from
Jan 31, 2022
Merged

fix: Repair type error with BaseProvider::request #23

merged 1 commit into from
Jan 31, 2022

Conversation

steveluscher
Copy link

The main branch, at the moment, is not buildable, if you delete the package-lock.json.

npm install && npm run build
@rollup/plugin-typescript TS2416: Property 'request' in type 'BaseProvider<U>' is not assignable to the same property in base type 'SafeEventEmitterProvider'.
  Type '<T>(args: RequestArguments) => Promise<Maybe<T>>' is not assignable to type '<T, U>(args: RequestArguments<T>) => Promise<Maybe<U>>'.
    Types of parameters 'args' and 'args' are incompatible.
      Type 'RequestArguments<T>' is not assignable to type 'RequestArguments'.
        Types of property 'params' are incompatible.
          Type 'T' is not assignable to type 'Record<string, unknown> | unknown[]'.
            Type 'T' is not assignable to type 'unknown[]'.

In this PR, we update the package-lock, and the Typescript types.

@steveluscher steveluscher marked this pull request as draft January 31, 2022 02:32
@metallicalfa2 metallicalfa2 marked this pull request as ready for review January 31, 2022 02:34
@metallicalfa2 metallicalfa2 merged commit e23db81 into torusresearch:main Jan 31, 2022
@metallicalfa2
Copy link
Contributor

@steveluscher Thanks for the PR. I'm gonna merge it. (I was in the midst of fixing the issue)

@steveluscher
Copy link
Author

Oh wow, I didn't intend this on being merged yet. It's missing a whole lot of stuff and the build actually doesn't work yet.

@steveluscher
Copy link
Author

@metallicalfa: the current version of my repair-type-error-in-baseProvider branch is the one that fixes it!

@steveluscher
Copy link
Author

Fixed in #25

@metallicalfa2
Copy link
Contributor

@steveluscher By bad. That exchange change was fixing another usage. Hence, i merged it.

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

Successfully merging this pull request may close these issues.

2 participants