🐛 Gate the universe to finite, literal keys

An open universe (`string`, `number`, a template literal) makes the
handler map index-like, so a partial object satisfied the exhaustive
overload and the runtime `dispatch` throw was reachable. A universe
containing a member and its stringification (`"true" | true`, `1 | "1"`)
collapsed two members onto one key.

- reject broad universes and value/stringification collisions at the
  factory, with a diagnostic naming the reason
- invert `PatternKey` against the universe (`Member<T, K>`) instead of
  `PatternParam<K>`, so a standalone `"true"` is typed `"true"`
- intersect `UniverseGate<T>` into the handler and fallback parameters,
  preserving `R` inference and the popup
This commit is contained in:
tmu committed 2026-09-23 13:41:57 +00:00
1 parent 1723419e69
commit 3b5269f9e1
6 files changed
+953 -95

No files matched your search

+3 -1
View File
@@ -43,7 +43,9 @@
"silverwind",
"idris",
"todotasks",
"connor"
"connor",
"injective",
"injectivity"
],
"ignorePaths": ["dist", "node_modules", "coverage", "*.svg", ".gitignore"]
}