Files
2nd/10_Wiki/Topics/DevOps_and_Security/타입스크립트 상태 관리 및 분기 처리 설계.md
T
2026-05-10 22:08:15 +09:00

1.5 KiB

id, title, category, status, canonical_id, duplicate_of, aliases, source_trust_level, confidence_score, verification_status, tags, last_reinforced, github_commit
id title category status canonical_id duplicate_of aliases source_trust_level confidence_score verification_status tags last_reinforced github_commit
wiki-2026-0508-타입스크립트-상태-관리-및-분기-처리-설계 타입스크립트 상태 관리 및 분기 처리 설계 10_Wiki/Topics duplicate type-safe-error-handling-exhaustiveness-checking Type-safe Error Handling Exhaustiveness Checking
Discriminated Union State
TS State Machine
A 0.9 redirected
duplicate
typescript
state-management
discriminated-union
2026-05-10 pending

타입스크립트 상태 관리 및 분기 처리 설계

이 문서는 Type-safe Error Handling Exhaustiveness Checking 의 중복본입니다. Canonical 문서로 redirect.

핵심 요약 (specialization)

  • TS 상태 모델링: type State = { kind: 'idle' } | { kind: 'loading' } | { kind: 'success', data: T } | { kind: 'error', err: E } — discriminated union 으로 모든 분기 exhaustiveness 보장.
  • switch (s.kind) + default: const _: never = s 패턴 — 새로운 state 추가 시 compile error 로 모든 분기 강제 갱신.

🔗 Graph

🕓 변경 이력

날짜 변경
2026-05-08 Phase 1
2026-05-10 중복 처리 — canonical 문서로 redirect