10 lines
319 B
TypeScript
10 lines
319 B
TypeScript
import { z } from "zod";
|
|
|
|
const dimension = z.number().int().min(1).max(8192);
|
|
|
|
export const batchInstructionSizeSchema = z
|
|
.object({ width: dimension, height: dimension })
|
|
.refine(({ width, height }) => width * height <= 24_000_000);
|
|
|
|
export type BatchInstructionSize = z.infer<typeof batchInstructionSizeSchema>;
|