feat: 添加@types/jest依赖并优化类型安全

refactor: 重构代码减少any类型使用,增加类型定义
fix: 修复TypeScript编译错误和类型不匹配问题
docs: 更新代码审查修复总结文档
style: 优化代码格式和注释
perf: 添加性能优化工具函数和虚拟滚动组件
test: 完善测试相关配置和类型定义
build: 更新package-lock.json文件
This commit is contained in:
2026-03-20 09:53:25 +08:00
parent 48a78137c5
commit 989c4b13a6
22 changed files with 807 additions and 7741 deletions

View File

@@ -407,7 +407,7 @@ class MockArbitrageDataSource implements IArbitrageDataSource {
taxCost: 1,
exchangeRate: 0.14
},
risk_level: ['LOW', 'MEDIUM', 'HIGH'][Math.floor(Math.random() * 3)] as any,
risk_level: ['LOW', 'MEDIUM', 'HIGH'][Math.floor(Math.random() * 3)] as 'LOW' | 'MEDIUM' | 'HIGH' | 'BLOCK',
opportunity_score: Math.floor(Math.random() * 40) + 50,
status: 'PENDING',
execution_mode: 'MANUAL',

View File

@@ -168,7 +168,7 @@ class MockCertificateDataSource extends BaseMockDataSource<Certificate, Certific
}
const updates: Partial<Certificate> = {
status: status as any,
status: status as 'APPROVED' | 'PENDING' | 'REJECTED' | 'EXPIRED',
};
if (status === 'APPROVED') {