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

SHARD-2024: Add typing to extracted methods #143

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

urnotsam
Copy link
Contributor

@urnotsam urnotsam commented Mar 21, 2025

PR Type

enhancement


Description

  • Add specific TypeScript typings to method interfaces.

  • Replace 'any' types with precise types.

  • Import and use NestedCounters type.


Changes walkthrough 📝

Relevant files
Enhancement
eth_getTransactionByBlockHashAndIndex.ts
Add TypeScript typings to method interface                             

src/eth-handlers/eth_getTransactionByBlockHashAndIndex.ts

  • Added specific TypeScript typings to interface.
  • Replaced 'any' with precise types.
  • Imported and used NestedCounters type.
  • +7/-6     
    eth_getTransactionByBlockNumberAndIndex.ts
    Add TypeScript typings to method interface                             

    src/eth-handlers/eth_getTransactionByBlockNumberAndIndex.ts

  • Added specific TypeScript typings to interface.
  • Replaced 'any' with precise types.
  • Imported and used NestedCounters type.
  • +7/-6     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🏅 Score: 95
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Type Definitions

    Ensure that the newly added type definitions for ensureArrayArgs and countFailedResponse are correct and cover all possible use cases.

    nestedCountersInstance: NestedCounters
    ensureArrayArgs: (args: RequestParamsLike, callback: JSONRPCCallbackTypePlain) => boolean
    countFailedResponse: (api: string, reason: string) => void
    Type Definitions

    Verify that the type definitions for ensureArrayArgs and countFailedResponse are accurate and handle all scenarios.

    nestedCountersInstance: NestedCounters
    ensureArrayArgs: (args: RequestParamsLike, callback: JSONRPCCallbackTypePlain) => boolean
    countFailedResponse: (api: string, reason: string) => void

    Copy link

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @mhanson-github mhanson-github merged commit 9e23935 into mainnet-launch Mar 21, 2025
    5 checks passed
    @mhanson-github mhanson-github deleted the SHARD-2024-typing branch March 21, 2025 21:56
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants