Skip to content

Commit 9576f20

Browse files
docs: clarify isZodRawShape only supports Zod values for auto-wrap
1 parent f2fdbe7 commit 9576f20

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

packages/core/src/util/standardSchema.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ export function isStandardSchemaWithJSON(schema: unknown): schema is StandardSch
139139
}
140140

141141
/**
142-
* Detects a "raw shape" — a plain object whose values are Zod (or other
143-
* Standard Schema) field schemas, e.g. `{ name: z.string() }`. Powers the
144-
* auto-wrap in {@linkcode normalizeRawShapeSchema}.
142+
* Detects a "raw shape" — a plain object whose values are Zod field schemas,
143+
* e.g. `{ name: z.string() }`. Powers the auto-wrap in
144+
* {@linkcode normalizeRawShapeSchema}, which wraps with `z.object()`, so only
145+
* Zod values are supported even though the predicate accepts any Standard Schema.
145146
*
146147
* @internal
147148
*/

0 commit comments

Comments
 (0)