fix(typescript): replace any with proper types for Exchange router methods#1419
fix(typescript): replace any with proper types for Exchange router methods#1419AbhilashG12 wants to merge 3 commits into
Conversation
…thods - fetchMarketMatches: any → typed params + MatchResult[] - fetchEventMatches: any → typed params + EventMatchResult[] - compareMarketPrices: any → typed params + PriceComparison[] - fetchMatchedPrices: any → typed params + PriceComparison[] - fetchArbitrage: any → typed params + ArbitrageOpportunity[] Fixes pmxt-dev#1403
- Sync with BaseExchange.ts - Remove fetchEventsPaginated (not in BaseExchange) Fixes pmxt-dev#1403
PR Review: FAILWhat This DoesThis PR is intended to tighten TypeScript SDK typings for router/matching methods. In the final head commit, however, the regenerated Blast RadiusTypeScript SDK only ( Consumer VerificationBefore (base branch): After (PR branch): Test Results
Findings
PMXT Pipeline Check
Semver Impactpatch if fixed -- intended SDK type-only bug fix, but current head contains a breaking hosted SDK regression. RiskI could not run the full TypeScript build because generated SDK artifacts are absent in the review checkout, but the blocking issues above are visible in the checked-in source and do not depend on build output. |
PR Review: FAILWhat This DoesThis PR is intended to replace Blast RadiusTypeScript SDK client method declarations in Consumer VerificationBefore (base branch): async fetchMarketMatches(params?: any): Promise<any[]>
async compareMarketPrices(params: any): Promise<any[]>This is the issue the PR title/body says it fixes. After (PR branch): // sdks/typescript/pmxt/client.ts:1552
async fetchMarketMatches(params?: any): Promise<any[]>
// sdks/typescript/pmxt/client.ts:1602
async fetchEventMatches(params?: any): Promise<any[]>
// sdks/typescript/pmxt/client.ts:1627
async compareMarketPrices(params: any): Promise<any[]>
// sdks/typescript/pmxt/client.ts:1677
async fetchMatchedMarkets(params?: any): Promise<any[]>So a TypeScript SDK consumer still receives no typed params/results for these Exchange methods. Test Results
Findings
PMXT Pipeline Check
Semver Impactpatch -- intended type-only SDK fix, but the current head does not deliver the advertised type improvement. RiskBecause |
What this PR does
Adds proper TypeScript types to Exchange router methods.
The Problem
Five Exchange methods used
params?: anyinstead of typed params:fetchMarketMatchesfetchEventMatchescompareMarketPricesfetchMatchedPricesfetchArbitrageThe Fix
router.tsWhy it matters
TypeScript users now get proper type checking when calling these methods.
Fixes #1403