@birhaus/types
v3.0.1
Published
Central type definitions for BIRHAUS components
Downloads
11
Maintainers
Readme
@birhaus/types
Central type definitions for BIRHAUS components, providing type safety and consistency across all packages.
Overview
This package contains all shared TypeScript interfaces, types, and type utilities used throughout the BIRHAUS component system. It resolves type conflicts and provides discriminated unions for complex component interactions.
Key Features
- Discriminated Unions: Type-safe handling of complex component states
- Type Guards: Runtime type checking utilities
- Spanish-First: Bilingual interface definitions following BIRHAUS principles
- Conflict Resolution: Centralized types prevent cross-package conflicts
Usage
// Import specific type modules
import { SystemUndoAction, SimpleUndoAction, isSystemUndoAction } from '@birhaus/types/undo'
import { ValidationRule } from '@birhaus/types/validation'
import { CognitiveLoadMetrics } from '@birhaus/types/metrics'Type Categories
Undo System (/undo)
SystemUndoAction: Complex undo actions with metadataSimpleUndoAction: Simple UI undo actions- Type guards:
isSystemUndoAction,isSimpleUndoAction
Validation (/validation)
ValidationRule: Unified validation interface- Supports Spanish-first error messaging
Metrics (/metrics)
CognitiveLoadMetrics: BIRHAUS cognitive load trackingPerformanceMetrics: Component performance metrics
Themes (/theme)
BirhausTheme: Unified theme interfaceThemeConfig: Theme configuration optionsThemeRegistry: Available theme registry
Progress (/progress)
ProgressInfo: Progress tracking interface- Supports cancellation and messaging
BIRHAUS Compliance
All types follow BIRHAUS design principles:
- Spanish-first internationalization
- Cognitive load reduction
- Type safety through discriminated unions
- Performance optimized with zero runtime overhead
