Skip to content

Commit 9edca8b

Browse files
committed
fix typos
1 parent 7fdfae1 commit 9edca8b

5 files changed

+9
-9
lines changed

.dependency-cruiser.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module.exports = {
9191
{
9292
name: 'no-duplicate-dep-types',
9393
comment:
94-
"Likeley this module depends on an external ('npm') package that occurs more than once " +
94+
"Likely this module depends on an external ('npm') package that occurs more than once " +
9595
"in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " +
9696
"maintenance problems later on.",
9797
severity: 'warn',
@@ -140,7 +140,7 @@ module.exports = {
140140
"This module depends on an npm package that is declared as an optional dependency " +
141141
"in your package.json. As this makes sense in limited situations only, it's flagged here. " +
142142
"If you're using an optional dependency here by design - add an exception to your" +
143-
"depdency-cruiser configuration.",
143+
"dependency-cruiser configuration.",
144144
from: {},
145145
to: {
146146
dependencyTypes: [

ERROR_HANDLING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ try {
106106
names: ["Dave", 12], // 12 is not a string
107107
address: {
108108
line1: "123 Maple Ave",
109-
zipCode: 123, // zip code isnt 5 digits
109+
zipCode: 123, // zip code isn't 5 digits
110110
extra: "other stuff", // unrecognized key
111111
},
112112
});
@@ -327,7 +327,7 @@ err.flatten( (i: ZodIssue) => {
327327
```
328328

329329
- `fieldErrors` is an object. The keys are the field(s) that threw the error. The values are an array of error strings that can be easily presented in the interface.
330-
- `formErrors: string[]` is an array of errors that occured on the "root" of the object schema. For instance if you called `FormData.parse(null)`, `formErrors` would be:
330+
- `formErrors: string[]` is an array of errors that occurred on the "root" of the object schema. For instance if you called `FormData.parse(null)`, `formErrors` would be:
331331
```ts
332332
["Invalid input: expected object, received null"];
333333
```

MIGRATION.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Zod 2 is being retired and will not leave beta. This is due to some unintuitive
4040

4141
- The **minimum TypeScript version** is now _4.1_ (up from 3.7 for Zod 2). Several features have been rewritten to use [recursive conditional types](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#recursive-conditional-types), an incredibly powerful new feature introduced in TS4.1.
4242

43-
- **Transformers syntax**. Previously, creating a transformer required an input schema, an output schema, and a function to tranform between them. You created transformers like `z.transform(A, B, func)`, where `A` and `B` are Zod schemas. This is no longer the case. Accordingly:
43+
- **Transformers syntax**. Previously, creating a transformer required an input schema, an output schema, and a function to transform between them. You created transformers like `z.transform(A, B, func)`, where `A` and `B` are Zod schemas. This is no longer the case. Accordingly:
4444

4545
The old syntax is no longer available:
4646

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ myFunction; // (arg: string)=>number[]
11981198

11991199
## Preprocess
12001200

1201-
Typically Zod operates under a "parse, then tranform" paradigm. Zod validates the input first, then passes it through a chain of transformation functions. (For more information about transforms, read the [.transform docs](#transform).)
1201+
Typically Zod operates under a "parse, then transform" paradigm. Zod validates the input first, then passes it through a chain of transformation functions. (For more information about transforms, read the [.transform docs](#transform).)
12021202

12031203
But sometimes you want to apply some transformation to the input _before_ parsing happens. A common use case: type coercion. Zod enables this with the `z.preprocess()`.
12041204

@@ -1570,7 +1570,7 @@ z.union([z.string(), z.number()]);
15701570

15711571
### `.and`
15721572

1573-
A convenience method for creating interesection types.
1573+
A convenience method for creating intersection types.
15741574

15751575
```ts
15761576
z.object({ name: z.string() }).and(z.object({ age: z.number() })); // { name: string } & { age: number }
@@ -1679,7 +1679,7 @@ Tuples
16791679
Recursive Types
16801680
Function Schemas
16811681
1682-
<abbr title="For instance, Yup allows custmo error messages with the syntax yup.number().min(5, 'Number must be more than 5!')">Validation Messages</abbr>
1682+
<abbr title="For instance, Yup allows custom error messages with the syntax yup.number().min(5, 'Number must be more than 5!')">Validation Messages</abbr>
16831683
Immutable instances
16841684
Type Guards
16851685
Validity Checking

src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2902,7 +2902,7 @@ export class ZodEffects<
29022902
constructor(def: ZodEffectsDef<T>) {
29032903
super(def);
29042904
// if (def.schema instanceof ZodEffects) {
2905-
// throw new Error(ZodFirstPartyTypeKind.ZodEffectscannot be nested.");
2905+
// throw new Error(ZodFirstPartyTypeKind.ZodEffects cannot be nested.");
29062906
// }
29072907
}
29082908

0 commit comments

Comments
 (0)