chore: Update the types

This commit is contained in:
BluJ
2023-04-11 11:54:57 -06:00
parent 9810c222dd
commit be2019fda1
13 changed files with 188 additions and 101 deletions

View File

@@ -113,14 +113,16 @@ describe("values", () => {
testOutput<typeof validator._TYPE, Array<"a" | "b">>()(null);
});
test("object", () => {
const value = Value.object({
name: "Testing",
spec: Config.of({
const value = Value.object(
{
name: "Testing",
},
Config.of({
a: Value.boolean({
name: "test",
}),
}),
});
})
);
const validator = value.validator();
validator.unsafeCast({ a: true });
testOutput<typeof validator._TYPE, { a: boolean }>()(null);