t() 에 넘길 수 있는 모든 유효 키의 유니온 타입(예: 'filter.apply'). 왜 필요한가:
t('filter.aply') 처럼 오타가 나면 이 타입이 없을 때는 런타임에야 "키 없음" 경고로 드러난다 —
유니온으로 묶어 두면 컴파일 타임에 바로 에러가 난다.
Union of every key valid for t() (e.g. 'filter.apply'). Why this exists: without it, a typo
like t('filter.aply') only surfaces as a runtime "unknown key" warning; unioning the keys
turns it into a compile-time error instead.
t()에 넘길 수 있는 모든 유효 키의 유니온 타입(예:'filter.apply'). 왜 필요한가:t('filter.aply')처럼 오타가 나면 이 타입이 없을 때는 런타임에야 "키 없음" 경고로 드러난다 — 유니온으로 묶어 두면 컴파일 타임에 바로 에러가 난다.Union of every key valid for
t()(e.g.'filter.apply'). Why this exists: without it, a typo liket('filter.aply')only surfaces as a runtime "unknown key" warning; unioning the keys turns it into a compile-time error instead.t()に渡せるすべての有効なキーのユニオン型です(例:'filter.apply')。なぜ必要なのか:t('filter.aply')のようなタイプミスは、この型がないと実行時になってようやく「キーがありません」 という警告として現れます — ユニオンにまとめておけば、コンパイル時にすぐエラーになります。可传给
t()的所有有效键的联合类型(例如'filter.apply')。为什么需要它: 没有这个类型时,t('filter.aply')这样的拼写错误要到运行时才会以「找不到键」的警告暴露出来 — 把键收拢成联合类型, 编译时就直接报错。