TypeScript Type Strategy

Published Updated
Mandates that TypeScript types for options, datasets, and configurations must be imported from the schema rather than hand-typed.

To avoid type drifts, synchronization bugs, and compiler discrepancies, all UI option and dataset rows must map directly to enums and schemas generated by the Aircada CLI.

Component props representing option selections must be typed using generated registry parameters rather than inline object shapes.

typescript
import { StandardColorsRow } from '../registry/options.generated';

// ❌ INCORRECT: Hand-typing option fields locally
interface BadProps {
    colorItem: { id: string; name: string; hex: string; transparency: boolean };
}

// 🟢 CORRECT: Importing the canonical schema type
interface GoodProps {
    colorItem: StandardColorsRow;
}
Prop Typing with Schema Imports