A
arktype2mo ago
onek

Globally set `configure({ actual: () => "" })`

Hello, exploring your library, so far very good. Is it possible to do this globally?
import { configure } from 'arktype';
configure({ actual: () => "" })
import { configure } from 'arktype';
configure({ actual: () => "" })
I get error: ' Object literal may only specify known properties, and 'actual' does not exist in type 'ArkConfig'.ts(2353' Is there another way to acheive this outcome? So I don't get the '(was a ...)' for all my arktype schemas?
2 Replies
ssalbdivad
ssalbdivad2mo ago
hmm a global flag for this would be useful I think I considered something like this once but was thinking that trying to configure the format of an error message for every possible error type would be an antipattern, but I can see how for this it would be very helpful could you log an issue and I can potentially get this addressed in 2.2?
onek
onekOP2mo ago
GitHub
Globally configure format of error messages. · Issue #1538 · arkt...
Request a feature Thank you for this project. It would be great to globally configure the format of error messages. 🤷 Motivation I'd like to exclude the (was a ...) part of error messages acros...

Did you find this page helpful?