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: correct CKBRPC.createBatchRequest() types #683

Merged
merged 3 commits into from
May 13, 2024

Conversation

twhy
Copy link
Contributor

@twhy twhy commented May 13, 2024

Description

This PR aims to correct CKBRPC.createBatchRequest() types.

// Before
createBatchRequest: <N extends keyof Base, P extends (string | number | object)[], R = any[]>(params?: any) => any;

// After
createBatchRequest: <N extends keyof Base, P extends (string | number | object)[], R = any[]>(params?: [method: N, ...rest: P][]) => [method: N, ...rest: P][] & {
    add: (n: N, ...p: P) => [method: N, ...rest: P][];
    remove: (index: number) => [method: N, ...rest: P][];
    exec: () => Promise<R>;
};

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

$ npx pnpm build
$ npx pnpm test

Copy link

vercel bot commented May 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lumos-website ✅ Ready (Inspect) Visit Preview May 13, 2024 5:01am

Copy link
Collaborator

@homura homura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, can you add a changeset for @ckb-lumos/rpc for this PR?

npx changeset add

.eslintrc.next.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@homura homura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, can you add a changeset for @ckb-lumos/rpc for this PR?

npx changeset add

@twhy
Copy link
Contributor Author

twhy commented May 13, 2024

Hi, can you add a changeset for @ckb-lumos/rpc for this PR?

npx changeset add

Added.

@homura homura merged commit 14ed633 into ckb-js:develop May 13, 2024
4 checks passed
@github-actions github-actions bot mentioned this pull request May 11, 2024
@twhy twhy deleted the fix-CKBRPC-createBatchRequest-types branch May 13, 2024 08:17
@github-actions github-actions bot mentioned this pull request Jun 6, 2024
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