Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tvillaren committed Feb 6, 2024
1 parent 092aaea commit f638a8f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ export const heroSchema = z.object({
});
```

It can also reference imported types from any modules but will use an `any` validation as placeholder, as we cannot now
### Non-Zod imports

`ts-to-zod` can reference imported types from other modules but will use an `any` validation as placeholder, as we cannot now
their schema.

```ts
Expand Down Expand Up @@ -454,10 +456,9 @@ export interface Hero {
}

// heros.zod.ts (output)
import { Person } from "@3rdparty/person";
import { zVillain } from "../generated/villain.zod";

const personSchema = z.instanceof(Person);
const personSchema = z.any();

export const heroSchema = z.object({
name: z.string(),
Expand Down

0 comments on commit f638a8f

Please sign in to comment.