import type { z } from "zod"; export type InferRow = TTable extends { $inferSelect: infer R } ? R : never; /** * Infer the output type from either a Zod schema or a Drizzle table. */ export type InferOutputEntry = T extends z.ZodTypeAny ? z.infer : T extends { $inferSelect: any } ? InferRow : never; type FallbackTableName = [keyof Schema & string] extends [never] ? string : never; export type OutputAccessor = { (table: FallbackTableName): Array; (table: K): Array>; } & { [K in keyof Schema & string]: Array>; };