From a7d053ed73652ba95a3dabd2da2dadfcc05e95ed Mon Sep 17 00:00:00 2001 From: Ansh Grover <168731971+Anshgrover23@users.noreply.github.com> Date: Sat, 15 Feb 2025 15:48:50 +0530 Subject: [PATCH] add maxVoltageRating to capacitor (#133) * add maxVoltageRating to capacitor * add maxVoltageRating to capacitor --- src/source/source_simple_capacitor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/source/source_simple_capacitor.ts b/src/source/source_simple_capacitor.ts index 8ae851c..7074e22 100644 --- a/src/source/source_simple_capacitor.ts +++ b/src/source/source_simple_capacitor.ts @@ -3,12 +3,13 @@ import { source_component_base, type SourceComponentBase, } from "src/source/base/source_component_base" -import { capacitance, distance } from "src/units" +import { capacitance, distance, voltage } from "src/units" import { expectTypesMatch } from "src/utils/expect-types-match" export const source_simple_capacitor = source_component_base.extend({ ftype: z.literal("simple_capacitor"), capacitance, + max_voltage_rating: voltage.optional(), display_capacitance: z.string().optional(), max_decoupling_trace_length: distance.optional(), }) @@ -22,6 +23,7 @@ type InferredSourceSimpleCapacitor = z.infer export interface SourceSimpleCapacitor extends SourceComponentBase { ftype: "simple_capacitor" capacitance: number + max_voltage_rating?: number display_capacitance?: string max_decoupling_trace_length?: number }