From 1e137649776a32e64343b13b87382d8d8179f8dc Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Thu, 19 Sep 2024 19:48:23 -0700 Subject: [PATCH 1/2] Update pcb_hole.ts --- src/pcb/pcb_hole.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pcb/pcb_hole.ts b/src/pcb/pcb_hole.ts index bf2a39a..42e6243 100644 --- a/src/pcb/pcb_hole.ts +++ b/src/pcb/pcb_hole.ts @@ -1,15 +1,13 @@ import { z } from "zod" import { distance } from "../units" -const holeShapeEnum = z.enum(["circle", "square", "round", "oval"]) - export const pcb_hole = z .object({ pcb_hole_id: z.string(), type: z.literal("pcb_hole"), - hole_shape: holeShapeEnum.default("circle").transform((shape) => { + hole_shape: z.enum(["circle", "square", "round"]).default("circle").transform((shape) => { if (shape === "round") return "circle" - return shape as "circle" | "square" | "oval" + return shape as "circle" | "square" }), hole_diameter: z.number(), x: distance, From e008aacae52d78c1f632b14ca23ab900522f5c26 Mon Sep 17 00:00:00 2001 From: tscircuitbot Date: Fri, 20 Sep 2024 02:48:55 +0000 Subject: [PATCH 2/2] formatbot: Automatically format code --- src/pcb/pcb_hole.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pcb/pcb_hole.ts b/src/pcb/pcb_hole.ts index 42e6243..763e36a 100644 --- a/src/pcb/pcb_hole.ts +++ b/src/pcb/pcb_hole.ts @@ -5,10 +5,13 @@ export const pcb_hole = z .object({ pcb_hole_id: z.string(), type: z.literal("pcb_hole"), - hole_shape: z.enum(["circle", "square", "round"]).default("circle").transform((shape) => { - if (shape === "round") return "circle" - return shape as "circle" | "square" - }), + hole_shape: z + .enum(["circle", "square", "round"]) + .default("circle") + .transform((shape) => { + if (shape === "round") return "circle" + return shape as "circle" | "square" + }), hole_diameter: z.number(), x: distance, y: distance,