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

Need to swap overloaded methods in types/packages/caver-rpc/klay.d.ts #654

Open
mirageN1349 opened this issue May 14, 2022 · 0 comments
Open

Comments

@mirageN1349
Copy link

Describe the bug
Need to swap overloaded methods in types/packages/caver-rpc/klay.d.ts so that when receiving parameters via Parameters, an overloaded method with fewer required arguments is returned

How to reproduce
type Type = Parameters<keyof Klay['getBalance']>
When calling the getBalance function with these parameters, the obligatory blockNumber argument will be required, although it is not needed

Expected behavior
Type "Type" must return only required arguments

Attachments
image
image
image

Environment (please complete the following information)

  • caver-js 1.8.1
  • OS macos monterey 12.3.1
@mirageN1349 mirageN1349 changed the title Need to swap overloaded methods in types/packages/caver-rpc/klay.d.ts so that when receiving parameters via Parameters<fn>, an overloaded method with fewer required arguments is returned Need to swap overloaded methods in types/packages/caver-rpc/klay.d.ts May 14, 2022
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

No branches or pull requests

1 participant