diff --git a/electron/src/client/mainNamespace.ts b/electron/src/client/mainNamespace.ts index cbb27899..33bb7f9f 100644 --- a/electron/src/client/mainNamespace.ts +++ b/electron/src/client/mainNamespace.ts @@ -33,11 +33,13 @@ export const ethercatDevicesSchema = z.object({ }); // Update the EthercatDevicesEventData schema -export const ethercatDevicesEventDataSchema = z.object({ - Initializing: z.boolean(), - Done: ethercatDevicesSchema, - Error: z.string(), -}).check(rustEnum); +export const ethercatDevicesEventDataSchema = z + .object({ + Initializing: z.boolean(), + Done: ethercatDevicesSchema, + Error: z.string(), + }) + .check(rustEnum); export type EthercatDevicesEventData = z.infer< typeof ethercatDevicesEventDataSchema @@ -66,10 +68,12 @@ export const machinesEventSchema = eventSchema(machinesEventDataSchema); export type MachinesEvent = z.infer; // Keep the EthercatInterfaceDiscovery event -export const ethercatInterfaceDiscoveryEventDataSchema = z.object({ - Discovering: z.boolean(), - Done: z.string(), -}).check(rustEnum); +export const ethercatInterfaceDiscoveryEventDataSchema = z + .object({ + Discovering: z.boolean(), + Done: z.string(), + }) + .check(rustEnum); export type EthercatInterfaceDiscoveryEventData = z.infer< typeof ethercatInterfaceDiscoveryEventDataSchema diff --git a/electron/src/lib/types.ts b/electron/src/lib/types.ts index 5e01ff79..24c6bfb0 100644 --- a/electron/src/lib/types.ts +++ b/electron/src/lib/types.ts @@ -12,6 +12,6 @@ export const rustEnum: z.core.CheckFn = (ctx) => { ctx.issues.push({ code: "custom", message: "Exactly one property must be defined", - input: definedKeys + input: definedKeys, }); -} +}; diff --git a/electron/src/machines/types.ts b/electron/src/machines/types.ts index 4a47e0ae..71ce2b13 100644 --- a/electron/src/machines/types.ts +++ b/electron/src/machines/types.ts @@ -62,9 +62,11 @@ export type DeviceHardwareIdentificationEthercat = z.infer< typeof deviceHardwareIdentificationEthercatSchema >; -export const deviceHardwareIdentificationSchema = z.object({ - Ethercat: deviceHardwareIdentificationEthercatSchema, -}).check(rustEnum); +export const deviceHardwareIdentificationSchema = z + .object({ + Ethercat: deviceHardwareIdentificationEthercatSchema, + }) + .check(rustEnum); export type DeviceHardwareIdentification = z.infer< typeof deviceHardwareIdentificationSchema