From 43aac9589adc5a2e286bd10bb40b24db78717830 Mon Sep 17 00:00:00 2001 From: Mike Morearty Date: Tue, 19 Mar 2024 13:38:13 -0700 Subject: [PATCH] Fix small typos Fix two small mistakes in README.md: * Grammar: Change "it's" to "its" in one place * Add some spaces before a "^^^^" to point to what it is supposed to point to. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 469ebb8ad..0bb2a4ef3 100644 --- a/README.md +++ b/README.md @@ -2714,7 +2714,7 @@ inferSchema(z.string()); This approach loses type information, namely _which subclass_ the input actually is (in this case, `ZodString`). That means you can't call any string-specific methods like `.min()` on the result of `inferSchema`. -A better approach is to infer _the schema as a whole_ instead of merely it's inferred type. You can do this with a utility type called `z.ZodTypeAny`. +A better approach is to infer _the schema as a whole_ instead of merely its inferred type. You can do this with a utility type called `z.ZodTypeAny`. ```ts function inferSchema(schema: T) { @@ -2747,7 +2747,7 @@ Due to how TypeScript inference works, it is treating `schema` like a `ZodTypeAn ```ts function parseData(data: unknown, schema: T) { return schema.parse(data) as z.infer; - // ^^^^^^^^^^^^^^ <- add this + // ^^^^^^^^^^^^^^ <- add this } parseData("sup", z.string());