File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/convex-helpers/server Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1420,7 +1420,8 @@ export function convexToZod<V extends GenericValidator>(
14201420
14211421 let zodValidator : z . ZodTypeAny ;
14221422
1423- switch ( convexValidator . kind ) {
1423+ const { kind } = convexValidator ;
1424+ switch ( kind ) {
14241425 case "id" :
14251426 zodValidator = zid ( ( convexValidator as VId < any > ) . tableName ) ;
14261427 break ;
@@ -1483,8 +1484,11 @@ export function convexToZod<V extends GenericValidator>(
14831484 ) ;
14841485 break ;
14851486 }
1487+ case "bytes" :
1488+ throw new Error ( "v.bytes() is not supported" ) ;
14861489 default :
1487- throw new Error ( `Unknown convex validator type: ${ convexValidator . kind } ` ) ;
1490+ kind satisfies never ;
1491+ throw new Error ( `Unknown convex validator type: ${ kind } ` ) ;
14881492 }
14891493
14901494 return isOptional
You can’t perform that action at this time.
0 commit comments