- perf(types): type-checking
t()calls against a large namespace is no longer quadratic in the number of keys. TypeScript does not cachekeyofof an object type, and the types rebuilt the union of all keys of a namespace once per key while building the key union, and again in everyt()call to look up the return type. Both now use a cached key union, and a literal key is looked up directly instead of being intersected with every key. With 5,000 keys in one namespace and one call per key, the check time went from 14.8s to 1.1s (TypeScript 6); with 1,000 keys from 0.75s to 0.27s. Keys, return types and errors are unchanged. - perf(types): the selector API (
enableSelector: true/'strict') withcontextis no longer quadratic in the size of an object. To decide which keys a context keeps, the types scanned all keys of the object once for every key, also when TypeScript checks the selector withcontextwidened tostring. With 1,000 keys plus one context variant each, a namespace took 18.7s and failed with "Type instantiation is excessively deep and possibly infinite" (TS2589); 2,500 and more ran out of memory. The context variants of an object are now collected once, in one pass over its keys: 1,000 keys check in 0.69s, 5,000 in 3.1s. Long keys (whole sentences withkeySeparator: false) work as before. Selected values and errors are unchanged.