typescript-game-types
Installation
SKILL.md
TypeScript Game Types
When to Use
Use this skill when:
- Setting up type definitions for a new game project
- Refactoring JavaScript game code to TypeScript
- Implementing type-safe APIs for game systems
- Ensuring compile-time safety for game logic
Core Principles
- Branded Types: Use nominal typing for entity IDs, resource handles, and unique identifiers
- Discriminated Unions: Model game states and events with tagged unions
- Strict Null Safety: Enable strict TypeScript settings and handle undefined explicitly
- Type Guards: Create runtime type checking for dynamic game data
- Const Assertions: Use
as constfor game constants and enums