From f7b7a06f1ad39842e9ddaf669c8bc0576d94058e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 22 Sep 2026 10:33:26 +0000 Subject: [PATCH] :white_check_mark: Assert the fallback receives real boolean/nullish tags --- src/tagged-union.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tagged-union.test.ts b/src/tagged-union.test.ts index 42bf03b..e3e1d26 100644 --- a/src/tagged-union.test.ts +++ b/src/tagged-union.test.ts @@ -184,6 +184,9 @@ test("getTaggedUnionMatcher: a fallback receives unhandled boolean and nullish m | { readonly kind: false; readonly c: number } | { readonly kind: null; readonly d: number } >(); + // `true`/`false`/`null` are keyed as `"true"`/`"false"`/`"null"`, + // but the fallback still receives the boolean/null, not the string. + assert.ok(s.kind === true || s.kind === false || s.kind === null); return 2 as const; });