Can the output of `.json` be used to construct an arktype schema?
Add property to object based on its data
Attribute 1 name
and Attribute 1 value
, and so on for 2, 3, 4...
On the output object, I'd like to make a Record where the name is the key, and it points to an object based on the attribute data (name and value in this case).
So if the product type is (simplified):...customize errors
validating 0x prefixed hex
0x<hex>
in typescript...
``ts
type Address =
0x${string}`...No validation of field until schema is complete ?
type
field. I think I have found a way to express this in Arktype, but the validation doesn't seem to work as intended.
Here is a minimal way to reproduce:...Unsatisfiable type
Intersection of { client_id: string, code: string, grant_type: "authorization_code", redirect_uri: (In: string ) => Out<URL>, + (undeclared): delete } and { client_secret: string, code_verifier?: never, + (undeclared): delete } | { code_verifier: string, client_secret?: never, + (undeclared): delete } results in an unsatisfiable type
. I've tested it in the playground and it works, but not in my code and I can't figure out why.
```ts
const secretOrVerifier = type(
{...Type '"DateValue | undefined"' is not assignable to type '"'DateValue' is unresolvableโ"'.ts(2322)

Can the JSON Schema be typed automatically?
question about arktype => TS
Generic minimum and maximum
`.configure` not being applied
.configure
to customize the error messages and it seems like it isn't being applied.
For instance if you put this in the playground, you'll see that the error message is "Password must contain at least one character that isn't a letter or number"
. My expectation is that it would either be 'override problem'
or 'override message'
because that's what I've configured.
Additionally, if I add console.log
statements to the problem
and message
functions it looks like those never run....It is compatible with Nuxt UI?
How to ensure comma delimited set of numbers or fallback to undefined?
Fix Slow Types Warning When Publishing to JSR?
onUndeclaredKey()
Hint for discriminators in union for better error messages?
0|1
& 2|3
)....Discriminated union with union type discriminator gives wrong error messages
Optional union value?
type inference resolves types from scopes to never in union
Standard Schema validation output issues can't be flattened
string < 10 & /some_regex/
and it fails both
I feel like the default should flatten all errors in arktype to match the others behavior, or at least make it configurable?
Or is the intention to just wrap our own StandardSchema around arktype where we flatten if needed?...