summaryrefslogtreecommitdiffhomepage
path: root/src/types.ts
blob: 75d6945a459155835bea4c7b058bc1ac24c16333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
 * Type definitions for the tire size data used throughout the app.
 * Each size entry has a human-readable label and a diameter in millimeters.
 */

/** A single rim or tire size option from our reference data. */
export interface SizeOption {
  label: string;
  diameter_mm: number;
}

/** The shape of the imported tire_sizes.json file. */
export interface TireSizeData {
  wheel_sizes: SizeOption[];
  tire_sizes: SizeOption[];
}

/**
 * Results from the circumference calculation.
 * All values derived from: circumference = 3.13772 * (2 * tire + rim)
 */
export interface CircumferenceResult {
  mm: number;
  cm: number;
  inches: number;
}