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 8 commits into
Conversation
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 |
PR Updated ✅The rebase is complete and all conflicts are resolved. Changes:
Ready for review! 🙏 |
PR Review: FAILWhat This DoesReplaces several Blast RadiusTypeScript SDK hand-written/generated client surface and generator: Consumer VerificationBefore (base branch): After (PR branch): Test Results
Findings
PMXT Pipeline Check
Semver Impactpatch if limited to type tightening, but the current diff contains breaking hosted SDK behavior. RiskHigh for hosted TypeScript SDK consumers: trading/account methods can silently use the wrong transport or return empty lists. |
…enerate SDKs - Add FetchMarketMatchesParams, FetchEventMatchesParams - Add CompareMarketPricesParams, FetchMatchedPricesParams, FetchArbitrageParams - Update BaseExchange.ts with proper types - Update generator to recognize new types - Regenerate client.ts with proper types Fixes pmxt-dev#1403
2b86396 to
3a86f80
Compare
PR Review: FAILWhat This DoesAttempts to replace Blast Radius
Consumer VerificationBefore (base branch): After (PR branch): npm install
npm run build --workspace=pmxtjsRelevant output: I also inspected the generated Python exchange wrapper signatures with AST. Test Results
Findings
PMXT Pipeline Check
Semver Impactmajor if shipped as-is -- removes/changes Python constructor parameters and breaks TypeScript package builds. RiskThe intended TypeScript type improvements are not consumable until the import/generator issue is fixed and the unrelated Python wrapper regressions are reverted or deliberately handled as a breaking change. |
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