📝 Refresh license year, backlog notes and JSDoc
Bump the copyright to 2026 in LICENSE and README, add the comparison-section notes to the backlog, and trim the primitive-union factory JSDoc now that the universe rules live in README § Caveats.
This commit is contained in:
1 parent
c878e60ff2
commit
38484aa16d
4 files changed
+9
-8
No files matched your search
@@ -97,16 +97,15 @@ const dispatch =
|
||||
);
|
||||
|
||||
/**
|
||||
* Create a matcher for a finite primitive universe, with one common return type.
|
||||
* Create a matcher for a finite primitive universe, with one common return
|
||||
* type.
|
||||
*
|
||||
* Use it when the value itself is the union (`"yes" | "no"`) and every handler
|
||||
* returns the same type.
|
||||
*
|
||||
* The universe `T` must be a finite union of literals with no
|
||||
* value/stringification collision: broad members (`string`, `number`, template
|
||||
* literals) and `true | "true"` / `1 | "1"` are rejected at the call site. The
|
||||
* returned builder takes a handler map keyed by the members; supplying a second
|
||||
* fallback argument allows a partial map and receives the unhandled remainder.
|
||||
* The returned builder takes a handler map keyed by the members; supplying a
|
||||
* second fallback argument allows a partial map and receives the unhandled
|
||||
* remainder.
|
||||
*
|
||||
* @typeParam T - The finite universe of primitive members to match.
|
||||
* @returns A builder for the handler map, or the handler map plus a fallback.
|
||||
|
||||
Reference in new issue
Block a user