@davoodmehraban89 / VELYQOR / commits / d0de144
Fork 0

Intelligence, Advanced Charting & Trading Platform

fix(chart-ui): type narrow REST point records for React/TypeScript build

davoodmehraban89 committed Oct 12, 2026 at 00:25 UTC d0de144157dcc51963131d2fac7d886a7f1bbf09
1 file changed +2 -1
packages/chart-ui/src/LightweightMarketChart.tsx
+2 -1
@@ -88,7 +88,8 @@ export function LightweightMarketChart({symbol,from,to,timeframe,historyEndpoint
88 return {time:safeTime(timeframe==="1d"?(p.sessionDate??p.openTime??p.time??""):(p.openTime??p.time??""),timeframe==="1d"),...candleValue(p)};
89 }):data.series.map(p=>{
90 if(!("date" in p)&&!("time" in p))throw Error("Missing point timestamp");
91 - return {time:safeTime(p.date??p.time??"",timeframe==="1d"),value:pointValue(p)};
91 + const point=p as Point;
92 + return {time:safeTime(point.date??point.time??"",timeframe==="1d"),value:pointValue(point)};
93 });
94 for(let i=1;i<mapped.length;i++){
95 // Data must already be sorted and deduplicated by the provider adapter.