Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit History
-
feat: add comprehensive TypeScript types and type checking
Add complete TypeScript type definitions for the entire codebase based on the LeRobot dataset format, replacing all `any` types in core modules with proper types. ## Type Definitions Added - Create `src/types/` directory with domain-based type organization - `dataset.types.ts`: Dataset metadata, features (video, numeric, boolean) - `episode.types.ts`: Episode data structures for v2.x and v3.0 formats - `video.types.ts`: Video info and segmentation types - `chart.types.ts`: Chart data structures ## Core Changes - Replace all `any` types in data fetching (`fetch-data.ts`, `parquetUtils.ts`) - Add return types to all functions in episode data processing - Type component props in `episode-viewer.tsx`, `side-nav.tsx`, `data-recharts.tsx` - Fix BigInt/number conversions for v3.0 dataset compatibility - Handle null checks for optional fields (video_path, timestamps) ## Build & CI/CD - Add `type-check`, `type-check:watch`, and `validate` scripts to package.json - Remove `ignoreBuildErrors` …4f26d07