Eliminate any types from API layer#229
Conversation
Define typed raw response interfaces (RawInvoiceResponse, RawPoolStatsResponse, RawLPPositionResponse, RawEventLogResponse) to replace all any usages in parse functions and apiFetch calls. Closes TrusTrove#210
|
@DevRushd is attempting to deploy a commit to the K1NGD4VID Team on Vercel. A member of the Team first needs to authorize it. |
|
@DevRushd 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! 🚀 |
|
resolve Conflict @DevRushd |
|
Heads up — this PR is currently in CONFLICTING/DIRTY state because Filed by the post-wave audit sweep. |
Summary
Defines typed raw response interfaces to replace all
anyusages inapps/web/lib/api.ts, eliminating TypeScript type-safety holes in the API layer.Changes
RawInvoiceResponse,RawPoolStatsResponse,RawLPPositionResponse,RawEventLogResponse— model the exact snake_case shapes returned by the indexer APIraw: anyparameters replaced with the correspondingRaw*interfaceapiFetch<any>calls replaced withapiFetch<Raw*Response>data: any[]replaced withdata: RawInvoiceResponse[]in the inline paginated response typeImpact
anytypes remain inapps/web/lib/api.tsAcceptance criteria
anytypes used inlib/api.tstsc --noEmit— only pre-existing errors remain)Closes #210