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

  1. Branded Types: Use nominal typing for entity IDs, resource handles, and unique identifiers
  2. Discriminated Unions: Model game states and events with tagged unions
  3. Strict Null Safety: Enable strict TypeScript settings and handle undefined explicitly
  4. Type Guards: Create runtime type checking for dynamic game data
  5. Const Assertions: Use as const for game constants and enums

Implementation

Installs
7
GitHub Stars
26
First Seen
Jul 10, 2026