Skip to content

Commit 7266e69

Browse files
committed
Updates type references to refer to Zod directly
1 parent bb72a32 commit 7266e69

File tree

3 files changed

+107
-69
lines changed

3 files changed

+107
-69
lines changed

src/examples.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { describe, it, expect } from "vitest";
2-
import { convertJsonSchemaToZod, JSONSchema } from "./index";
2+
import { convertJsonSchemaToZod } from "./index";
33
import { z } from "zod/v4";
4+
import type { JSONSchema } from "zod/v4/core";
45
import examples from "./examples.json";
56

67
// Helper function to find differences between objects
@@ -54,7 +55,7 @@ describe("examples tests", () => {
5455
it(`should correctly convert example ${index}`, () => {
5556
try {
5657
// Convert JSON schema to Zod
57-
const zodSchema = convertJsonSchemaToZod(example);
58+
const zodSchema = convertJsonSchemaToZod(example as unknown as JSONSchema.BaseSchema);
5859

5960
// Convert Zod schema back to JSON schema
6061
const resultSchema = z.toJSONSchema(zodSchema);

0 commit comments

Comments
 (0)