Skip to content

Commit

Permalink
added max_decoupling_trace_length to source_simple_capacitor (#114)
Browse files Browse the repository at this point in the history
* added max_decoupling_trace_length to source simple capacitor

* added max_decoupling_trace_length to source simple capacitor
  • Loading branch information
Abse2001 authored Dec 31, 2024
1 parent 907dbab commit a5320d9
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,13 +3,14 @@ import {
source_component_base,
type SourceComponentBase,
} from "src/source/base/source_component_base"
import { capacitance } from "src/units"
import { capacitance, distance } 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,
display_capacitance: z.string().optional(),
max_decoupling_trace_length: distance.optional(),
})

export type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>
Expand All @@ -22,6 +23,7 @@ export interface SourceSimpleCapacitor extends SourceComponentBase {
ftype: "simple_capacitor"
capacitance: number
display_capacitance?: string
max_decoupling_trace_length?: number
}

expectTypesMatch<SourceSimpleCapacitor, InferredSourceSimpleCapacitor>(true)

0 comments on commit a5320d9

Please sign in to comment.