"arr[5] 가 존재 안 할 수. Type system 이 그렇게 말해야."
뭐 추가
noUncheckedIndexedAccess 없으면 배열 index 접근이 배열 element 의 타입 가짐. arr: string[] 면 arr[0] 가 string. 근데 arr[100] 도 string 타입 — runtime 에 undefined 인데도. Type system 이 존재 안 하는 index 에 거짓말.
Flag 와 함께 모든 index 접근이 T | undefined 타입. string[] 의 arr[0] 가 string | undefined. 값 쓰기 전 undefined case 처리해야. Type system 이 마침내 runtime 현실과 match.
왜 strict 와 별개
Flag 가 strict: true 의 일부 아냐 — 기존 codebase 에 retrofit 하려면 모든 배열 index 접근 만져야. 새 코드엔 켜. Legacy 코드엔 migration 신중히 plan.
Object index signature 도
Flag 가 index-signature object 접근에도 영향. Flag 켜진 const obj: Record<string, User> = {}; obj['anyKey'] 가 User | undefined. 옳음 — Record 가 빠진 key 에 undefined 반환 가능.
noUncheckedIndexedAccess 가 TypeScript 의 가장 정직한 flag. Index 접근이 undefined 반환 못 한다고 가장하기 거부. 강제하는 discipline — 쓰기 전 항상 narrow — 가 'undefined is not an object' runtime 버그 카테고리 통째 제거.