#typescript
4 snippets tagged with #typescript
typescriptbeginner
Environment Variable Validator
Validates required environment variables at startup and returns a typed config object or throws with missing keys.
#config#validation
typescriptadvanced
Redis Cache Get/Set Helper
Type-safe Redis cache wrapper with automatic JSON serialization, TTL support, and cache-aside pattern.
#redis#cache
typescriptadvanced
Context + useReducer State Management
Type-safe global state pattern combining React Context with useReducer for complex state without external libs.
#context#reducer
typescriptbeginner
Environment Variable Validation
Validate required environment variables at build time with type-safe access and descriptive errors.
#environment#validation