Jeffrey Konowitch
Jeffrey Konowitch
Explore posts from servers
Aarktype
Created by Jeffrey Konowitch on 1/2/2025 in #questions
`.and` with default, expected behavior?
import { type } from "arktype";

const a = type({
someVal: type('string > 0')
});

const b = a.and({
someVal: type('"foo"').default('foo')
});

console.log(b.from({}));
import { type } from "arktype";

const a = type({
someVal: type('string > 0')
});

const b = a.and({
someVal: type('"foo"').default('foo')
});

console.log(b.from({}));
This fails with error: Uncaught (in promise) AggregateError: someVal must be "foo" (was missing) Is this expected? In rc 26 this worked - just upgraded to 30 and it does not.
4 replies
DDeno
Created by Jeffrey Konowitch on 11/6/2024 in #help
How do you update npm dependencies (e.g. with ^1.0.0) to the latest version?
Is there a command to do this, and have the lockfile update? Or do I need to manually bump all the versions in deno.jsons to force that? Or do I simply delete the lockfile and reinstall?
2 replies