✅ Assert the fallback receives real boolean/nullish tags
This commit is contained in:
1 parent
c06538d6c1
commit
f7b7a06f1a
1 file changed
+3
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user