feat: create src/types/candles.ts with Candle interface (task 9.1)

Add shared Candle interface with time, open, high, low, close, and
optional volume fields. Volume is optional because the DB schema does
not store volume but the predict/patterns API routes accept it as an
optional field.

Mark task 9.1 as complete in tasks.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marko Djordjevic 2026-02-18 15:26:14 +01:00
parent 90d62cf187
commit 8b40a2cb9a
2 changed files with 13 additions and 1 deletions

View file

@ -81,7 +81,7 @@
## 9. Frontend — Shared Types & Type Safety
- [ ] 9.1 `[sonnet]` Create `src/types/candles.ts` with `Candle` interface
- [x] 9.1 `[sonnet]` Create `src/types/candles.ts` with `Candle` interface
- [ ] 9.2 `[sonnet]` Create `src/types/annotations.ts` with `Annotation`, `AnnotationType`, `Geometry` interfaces
- [ ] 9.3 `[sonnet]` Create `src/types/charts.ts` with `Chart` interface
- [ ] 9.4 `[sonnet]` Create `src/types/predictions.ts` with `PredictionSpan`, `PredictionState`, `ModelInfo` interfaces

12
src/types/candles.ts Normal file
View file

@ -0,0 +1,12 @@
/**
* Candle data types for candlestick chart data
*/
export interface Candle {
time: number;
open: number;
high: number;
low: number;
close: number;
volume?: number;
}