fix(#578): remove any casts from lib/blockchain modules#628
Merged
llinsss merged 3 commits intoJun 26, 2026
Conversation
- Remove `declare const process: any` from index.ts; @types/node (already a devDependency with "types": ["node"] in tsconfig) provides proper typings for the Node.js process global - Add MedicalRecord interface to types.ts and import it explicitly in stellarSync.ts, replacing the previously unresolved global reference - Use `import type` for type-only imports and `export type` for the MedicalRecord re-export to satisfy isolatedModules - Fix prettier devDependency version from ^3.9.0 (non-existent) to ^3.8.0 so that `npm ci` succeeds in CI Closes DogStark#578 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@Xaxxoo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Resolves the package-lock.json modify/delete conflict the same way as DogStark#650: regenerated the lockfile with npm install rather than keeping it deleted (npm ci requires a lockfile to exist, and main's own lockfile is independently out of sync regardless). Also resolves a real content conflict in package.json's devDependencies. While doing so, deduplicated a pre-existing mess already on main: roughly half of devDependencies were listed twice with conflicting versions (e.g. two 'prettier', two 'ts-jest', two '@types/jest' entries) -- valid JSON since duplicate keys silently take the last value, but clearly the result of an earlier improperly-resolved merge. Kept each key once, using whichever version was already the effective (last-listed, i.e. actually-installed) one on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #578 — removes all
anycasts from the two blockchain integration files.Changes
src/lib/blockchain/index.tsdeclare const process: anyand its comment.@types/nodeis already listed as a devDependency and"types": ["node"]is set intsconfig.json, so the Node.jsprocessglobal is already properly typed without a manual declaration.src/lib/blockchain/stellarSync.tsMedicalRecordwas referenced in method signatures and exported but was never imported or defined, causing aTS2304: Cannot find name 'MedicalRecord'error. Added a properimport type { MedicalRecord } from './types'import.import { stellarService, StellarService, TransactionResult }into a value import (stellarService) andimport typeimports (StellarService,TransactionResult) to comply with@typescript-eslint/consistent-type-importsandisolatedModules.export { MedicalRecord }→export type { MedicalRecord }as required byisolatedModules.src/lib/blockchain/types.tsMedicalRecordinterface (shaped from its usage instellarSync.ts):id,petId,type,critical,data.package.json/package-lock.jsonprettierdevDependency from^3.9.0(no such release exists; latest stable is3.8.4) to^3.8.0so thatnpm cisucceeds in CI. Without this fix theInstall dependenciesstep fails on every CI run.Acceptance Criteria
anyremains insrc/lib/blockchain/index.tsanyremains insrc/lib/blockchain/stellarSync.tsprocessdeclaration (tsc --noEmitreports zero errors for all blockchain/hooks files)Test plan
npm cicompletes without errors (prettier version fix)npx tsc --noEmitproduces no errors insrc/lib/blockchain/orsrc/hooks/useBlockchainSync.tseslint src/lib/blockchain/produces no errorsnpx next build) succeeds🤖 Generated with Claude Code