Skip to content

fix(types): resolve typecheck errors in AddressTransactionSearch and NavbarLogo#263

Merged
AugustoL merged 2 commits intoopenscan-explorer:release/v1.2.2-afrom
AugustoL:fix/typecheck-errors
Feb 27, 2026
Merged

fix(types): resolve typecheck errors in AddressTransactionSearch and NavbarLogo#263
AugustoL merged 2 commits intoopenscan-explorer:release/v1.2.2-afrom
AugustoL:fix/typecheck-errors

Conversation

@AugustoL
Copy link
Collaborator

Description

Fix all 19 TypeScript type errors reported by bun run typecheck / npm run typecheck, restoring a clean typecheck build.

Related Issue

Closes #260

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • src/services/AddressTransactionSearch.ts: Added explicit type parameters to three extractData calls that were missing them, causing 18 type errors where properties were accessed on {}
    • extractData(txResult.data)extractData<EthTransaction | null>(txResult.data)
    • extractData(receiptResult.data)extractData<EthTransactionReceipt | null>(receiptResult.data)
    • extractData(blockResult.data)extractData<EthBlock | null>(blockResult.data)
  • tsconfig.json: Added "types": ["vite/client"] to compiler options so import.meta.env is properly typed, fixing the 1 type error in NavbarLogo

Screenshots (if applicable)

N/A

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

All 19 errors (18 in AddressTransactionSearch.ts + 1 in NavbarLogo.tsx) are resolved. npm run typecheck now completes with zero errors.

…rLogo

Add explicit type parameters to extractData calls in
AddressTransactionSearch to fix 18 type errors on untyped tx/block/receipt
objects. Add vite/client types to tsconfig.json to resolve import.meta.env
type error in NavbarLogo.
@github-actions
Copy link

github-actions bot commented Feb 26, 2026

🚀 Preview: https://pr-263--openscan.netlify.app
📝 Commit: decd3222c50b54c607c2491ab721c1e6c0cfab1b

@AugustoL AugustoL merged commit 02842e5 into openscan-explorer:release/v1.2.2-a Feb 27, 2026
2 checks passed
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