Skip to content

Commit dcc78d7

Browse files
committed
changed the runtime zodschema check to use direct checking instead of a function
1 parent fb9ebec commit dcc78d7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/batch/src/parser.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ import type {
88
RuntimeZodType,
99
} from './types.js';
1010

11-
/**
12-
* Type guard to check if the schema is a Zod schema
13-
*
14-
* @param schema - The schema to check
15-
*/
16-
const isZodSchema = (schema: StandardSchemaV1) =>
17-
schema['~standard'].vendor === SchemaVendor.Zod;
18-
1911
/**
2012
* Extend the schema according to the event type passed.
2113
*
@@ -142,7 +134,7 @@ const parser = async (
142134
}
143135
if (innerSchema) {
144136
// Only proceed with schema extension if it's a Zod schema
145-
if (!isZodSchema(innerSchema)) {
137+
if (innerSchema['~standard'].vendor !== SchemaVendor.Zod) {
146138
logger.error(
147139
'The schema provided is not supported. Only Zod schemas are supported for extension.'
148140
);

0 commit comments

Comments
 (0)