Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added max_decoupling_trace_length to source_simple_capacitor #114

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading