Commit graph

1 commit

Author SHA1 Message Date
Pulse Monitor
46bb44d792 improve: comprehensive type safety improvements across codebase
Frontend (TypeScript):
- Eliminated all 'any' types (7 → 0)
- Added proper types for event system with generics
- Fixed event data interfaces with specific types
- Replaced any with unknown where appropriate

Backend (Go):
- Created central types.go with 30+ typed API structures
- Eliminated all interface{} in /internal/api package (158 → 0)
- Replaced map[string]interface{} with typed structs:
  - ChartResponse, VMChartData, NodeChartData, StorageChartData
  - DiagnosticsInfo with NodeDetails, ClusterInfo, PBSDetails
  - StorageChartsResponse with StorageMetrics
- Improved compile-time type safety for all API responses

Benefits:
- Better IDE support and autocomplete
- Compile-time error detection
- Clearer API contracts
- Improved maintainability

All tests passing, service running successfully with typed code.
2025-08-19 21:32:44 +00:00