Prove the default bound is wired, and name the option on the failure a consumer reads
Mirror / push (push) Successful in 4s
Test / lint (pull_request) Successful in 22s
Test / test (18) (pull_request) Failing after 19s
Test / test (20) (pull_request) Successful in 19s
Test / test (22) (pull_request) Successful in 24s
Test / test (24) (pull_request) Successful in 20s
Test / test (26) (pull_request) Successful in 19s

This commit is contained in:
2026-09-20 20:41:45 +02:00
parent 1416615ca3
commit a24f350b7a
7 changed files with 49 additions and 20 deletions
+4 -2
View File
@@ -9,7 +9,9 @@ export function errorFrom(reason: unknown): Error {
}
}
/** String() throws on a null-prototype object or a symbol, so only a string or number is printed. */
const printable: readonly string[] = ['boolean', 'number', 'string'];
/** String() throws on a null-prototype object or a symbol, so those are named by type instead. */
export function namedValue(value: unknown): string {
return typeof value === 'string' || typeof value === 'number' ? String(value) : typeof value;
return printable.includes(typeof value) ? String(value) : typeof value;
}