Skip to content

Commit

Permalink
Update column.types.ts
Browse files Browse the repository at this point in the history
check `Buffer` last so if node types are not present it doesn't match when it shouldn't.
  • Loading branch information
Tiedye committed Jan 20, 2025
1 parent 49d2930 commit 000e49a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drizzle-zod/src/column.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export type GetZodType<
: TData extends infer TTuple extends [any, ...any[]]
? z.ZodTuple<Assume<{ [K in keyof TTuple]: GetZodType<TTuple[K], string, undefined, undefined> }, [any, ...any[]]>>
: TData extends Date ? z.ZodDate
: TData extends Buffer ? z.ZodType<Buffer>
: TDataType extends 'array' ? z.ZodArray<GetZodType<Assume<TData, any[]>[number], string, undefined, undefined>>
: TData extends infer TDict extends Record<string, any>
? z.ZodObject<{ [K in keyof TDict]: GetZodType<TDict[K], string, undefined, undefined> }, 'strip'>
Expand All @@ -37,6 +36,7 @@ export type GetZodType<
: TData extends bigint ? z.ZodBigInt
: TData extends boolean ? z.ZodBoolean
: TData extends string ? z.ZodString
: TData extends Buffer ? z.ZodType<Buffer>
: z.ZodTypeAny;

type HandleSelectColumn<
Expand Down

0 comments on commit 000e49a

Please sign in to comment.