Skip to content

Commit

Permalink
add maxVoltageRating to capacitor (#133)
Browse files Browse the repository at this point in the history
* add maxVoltageRating to capacitor

* add maxVoltageRating to capacitor
  • Loading branch information
Anshgrover23 authored Feb 15, 2025
1 parent 521864b commit a7d053e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/source/source_simple_capacitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand All @@ -22,6 +23,7 @@ type InferredSourceSimpleCapacitor = z.infer<typeof source_simple_capacitor>
export interface SourceSimpleCapacitor extends SourceComponentBase {
ftype: "simple_capacitor"
capacitance: number
max_voltage_rating?: number
display_capacitance?: string
max_decoupling_trace_length?: number
}
Expand Down

0 comments on commit a7d053e

Please sign in to comment.