📝 Note the gate in changelog and backlog

Close the broad-universe type-hole task and cancel the widened-literal
test task, since arbitrary strings no longer fall through to a fallback.
This commit is contained in:
tmu committed 2026-09-23 13:42:25 +00:00
1 parent aaeeef1e11
commit ce287b384f
2 files changed
+11 -6

No files matched your search

+5
View File
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
- reject broad universes (`string`, `number`, template literals) and
value/stringification collisions (`true | "true"`, `1 | "1"`) at the factory
- type handler parameters by the matched member (`Member<T, K>`), so a
standalone `"true"` universe is typed `"true"` rather than `true`
## [0.6.0] - 2026-09-22 ## [0.6.0] - 2026-09-22
- add `getTaggedUnionMatcher` / `getTaggedUnionMatcherW` for discriminated unions - add `getTaggedUnionMatcher` / `getTaggedUnionMatcherW` for discriminated unions
+6 -6
View File
@@ -37,12 +37,12 @@ Testing:
✔ Rewrite `src/util/__tests__/lsp-completion.ts` onto `createMessageConnection` and typed requests @done ✔ Rewrite `src/util/__tests__/lsp-completion.ts` onto `createMessageConnection` and typed requests @done
✔ Update `development/testing.md § Autocomplete` for the new client @done ✔ Update `development/testing.md § Autocomplete` for the new client @done
✔ Run `npm run verify` and check the task off @done ✔ Run `npm run verify` and check the task off @done
☐ Test a literal union widened with `(string & {})` — `"red" | "green" | "yellow" | (string & {})` @medium ✘ Test a literal union widened with `(string & {})` — `"red" | "green" | "yellow" | (string & {})` @medium @cancelled
→ autocomplete should still offer the literals; arbitrary strings stay assignable and fall through to the fallback → broad universes are rejected; the rejection is covered by the broad-universe gate tests
☐ Type hole when using broad types like string as a universe @high ✔ Type hole when using broad types like string as a universe @high @done
☐ handlers cannot be exhaustive, yet it is possible to not have a fallback → decided: broad universes are rejected at the factory, so the exhaustive overload can always be proven
☐ one test even exploits this, I think for a negative test → value/stringification collisions (`true | "true"`, `1 | "1"`) are rejected too; handler params are typed by `Member<T, K>`
☐ does the same type hole exist for tagged-union matchers or primitive-union matchers only? → see development/library.md § Supported universes
Matcher: Matcher:
✔ Clean up: adopt the 3-overload matcher (`src/prototype-ac2.ts`) and delete the prototypes @high @done ✔ Clean up: adopt the 3-overload matcher (`src/prototype-ac2.ts`) and delete the prototypes @high @done