docs: finalized wiki integrity maintenance (v3.0 standard) - pruned 1400+ stubs and fixed 11k+ ghost links
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
---
|
||||
id: P-REINFORCE-AUTO-DEC013
|
||||
category: "[[10_Wiki/💡 Topics/Programming & Language]]"
|
||||
category: "10_Wiki/💡 Topics/Programming & Language"
|
||||
confidence_score: 0.90
|
||||
tags: [auto-reinforced]
|
||||
last_reinforced: 2026-04-20
|
||||
github_commit: "[P-Reinforce] Continuous Worker - Discriminated Unions"
|
||||
---
|
||||
|
||||
# [[Discriminated Unions]]
|
||||
# [[Discriminated Unions|Discriminated Unions]]
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> Discriminated Unions(또는 식별 가능한 유니온, 태그된 유니온)은 서로 다른 데이터 형태를 구분하기 위해 공통된 리터럴 속성(판별자, Discriminant)을 사용하는 TypeScript의 패턴입니다 [1-3]. 일반적인 유니온 타입과 달리, 컴파일러가 판별자 속성을 확인하여 타입을 자동으로 안전하게 좁힐 수(Narrowing) 있게 해줍니다 [4-6]. 이를 통해 유효하지 않은 상태의 표현을 원천적으로 차단하고, 모든 가능한 경우를 처리하도록 강제하는 완전성 검사(Exhaustiveness checking)를 구현할 수 있습니다 [3, 7, 8].
|
||||
@@ -30,11 +30,11 @@ github_commit: "[P-Reinforce] Continuous Worker - Discriminated Unions"
|
||||
- **정책 변화:** Programming & Language 분야의 자동 자산화 수행.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Related Topics:** [[Union Types]], [[Type Narrowing]], [[Exhaustiveness Checking]], [[Literal Types]], [[never type]]
|
||||
- **Projects/Contexts:** [[React State Management]], [[State Machine Pattern]], [[API Response Handling]], [[Redux Reducers]]
|
||||
- **Related Topics:** [[Union Types|Union Types]], [[Type Narrowing|Type Narrowing]], [[Exhaustiveness-Checking|Exhaustiveness Checking]], [[리터럴 타입 (Literal Types)|Literal Types]], [[네버 타입 (never type)|never type]]
|
||||
- **Projects/Contexts:** React State Management, State Machine Pattern, API Response Handling, [[Redux-Reducers|Redux Reducers]]
|
||||
- **Contradictions/Notes:** Discriminated Union 패턴은 타입 안정성과 예측 가능성을 크게 높여주지만, 유니온 타입이 지나치게 복잡해지거나 깊은 중첩 구조를 가지게 되면 오히려 TypeScript의 컴파일 성능을 저하시키고 에러 메시지의 가독성을 떨어뜨리는 부작용(단점)을 유발할 수 있습니다 [10].
|
||||
|
||||
---
|
||||
*Last updated: 2026-04-18*
|
||||
- Raw Source: [[00_Raw/2026-04-20/Discriminated Unions.md]]
|
||||
- Raw Source: 00_Raw/2026-04-20/Discriminated Unions.md
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user