Back to list
Git-Fg

configuring-typescript

by Git-Fg

1🍴 0📅 Jan 18, 2026

SKILL.md


name: configuring-typescript description: "Configures modern TypeScript (4.9+ through 5.x) for maximum type safety with sustainable compile times. Use when designing type-safe configs/maps/APIs, enforcing strictness flags, improving TS build performance (incremental, project references), or setting up separate TS/ESLint configs for tests."

TypeScript Advanced Types

Modern TypeScript playbook for writing code that is correct, ergonomic, and fast enough.

Quick Reference

NeedSee
Modern features (satisfies, const type params)Modern Features
Generics, conditional types, mapped typesType-Level Toolbox
Config objects, event emitters, API clientsPractical Patterns
Test patterns, tsconfig templatesTests & Configs
Compile-time optimizationPerformance Playbook
Type testing, PR checklistType Testing

When to Use

Use this skill when:

  • Building type-safe configs/maps/APIs (feature flags, route tables, event maps)
  • Designing type-safe APIs (HTTP clients, RPC layers, CLI command maps)
  • Enforcing strictness beyond "strict": true:
    • noUncheckedIndexedAccess
    • exactOptionalPropertyTypes
    • verbatimModuleSyntax
  • Improving compile times (incremental builds, project references)
  • Setting up separate TS/ESLint configs for tests

Default Workflow

  1. Start with data shape and ownership — Is value internally constructed (safe) or external input (unsafe)?
  2. Choose the lightest typing toolsatisfies for configs, mapped types for transformations, infer for function inference
  3. Lock strictness and hygiene — Enable noUncheckedIndexedAccess, exactOptionalPropertyTypes, consider verbatimModuleSyntax
  4. Keep builds fast — Enable incremental, use project references in monorepos, measure with --extendedDiagnostics
  5. Tests: strict where matters, pragmatic where not — Separate tsconfig.test.json, ESLint overrides for test files only

Key Highlights

satisfies — Use Aggressively

Validates object shape without losing literal inference or widening to string/number.

type AppConfig = {
  env: "dev" | "prod";
  apiBaseUrl: string;
  retries: number;
};

export const config = {
  env: "dev",
  apiBaseUrl: "https://api.example.com",
  retries: 3,
} satisfies AppConfig;
// config.env is "dev" (literal), not "dev" | "prod"

Strictness Beyond "strict": true

noUncheckedIndexedAccess — Adds undefined to indexed access:

const dict: Record<string, { id: string }> = {};
const x = dict["missing"]; // { id: string } | undefined

exactOptionalPropertyTypes — Optional ≠ undefined:

type UserPrefs = { theme?: "dark" | "light" };
const prefs: UserPrefs = {};
prefs.theme = "dark";     // ok
// prefs.theme = undefined; // error

verbatimModuleSyntax — Module hygiene:

import type { User } from "./types";     // type-only
import { createUser } from "./runtime"; // runtime (kept in output)

Resources

See references/ for detailed guides on each topic.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon