Skip to content

Commit

Permalink
feature: Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vbudovski committed Dec 8, 2024
1 parent 4d8da18 commit dec3a3b
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 243 deletions.
1 change: 1 addition & 0 deletions paseri-lib/bench/lazy/type.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type T = string | T[];

const paseriSchema: p.Schema<T> = p.lazy(() => p.union(p.string(), p.array(paseriSchema)));
const zodSchema: z.ZodType<T> = z.lazy(() => z.union([z.string(), z.array(zodSchema)]));
// @ts-ignore TS2322 FIXME: Fails in TypeScript 5.6+.
const valitaSchema: v.Type<T> = v.lazy(() => v.union(v.string(), v.array(valitaSchema)));

const dataValid1 = 'Hello, world!';
Expand Down
1 change: 1 addition & 0 deletions paseri-lib/bench/union/discriminated.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const zodSchemaDiscriminator = z.discriminatedUnion('shape', [
z.object({ shape: z.literal('rectangle'), width: z.number(), height: z.number() }),
]);
const valitaSchema = v.union(
// @ts-ignore TS2322 FIXME: Fails in TypeScript 5.6+.
v.object({ shape: v.literal('circle'), radius: v.number() }),
v.object({ shape: v.literal('rectangle'), width: v.number(), height: v.number() }),
);
Expand Down
Loading

0 comments on commit dec3a3b

Please sign in to comment.