-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae8ee0f
commit fa80e1d
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import { z } from "zod"; | ||
import { z } from "zod" | ||
import { | ||
source_component_base, | ||
type SourceComponentBase, | ||
} from "src/source/base/source_component_base"; | ||
import { frequency } from "src/units"; | ||
import { expectTypesMatch } from "src/utils/expect-types-match"; | ||
} from "src/source/base/source_component_base" | ||
import { frequency } from "src/units" | ||
import { expectTypesMatch } from "src/utils/expect-types-match" | ||
|
||
export const source_simple_resonator = source_component_base.extend({ | ||
ftype: z.literal("simple_resonator"), | ||
frequency, | ||
load_capacitance: z.union([z.string(), z.number()]), | ||
pin_count: z.number().default(3), // Set the default pin count to 3 for resonators | ||
}); | ||
}) | ||
|
||
export type SourceSimpleResonatorInput = z.input<typeof source_simple_resonator>; | ||
type InferredSourceSimpleResonator = z.infer<typeof source_simple_resonator>; | ||
export type SourceSimpleResonatorInput = z.input<typeof source_simple_resonator> | ||
type InferredSourceSimpleResonator = z.infer<typeof source_simple_resonator> | ||
|
||
/** | ||
* Defines a simple resonator component | ||
*/ | ||
export interface SourceSimpleResonator extends SourceComponentBase { | ||
ftype: "simple_resonator"; | ||
frequency: number; | ||
load_capacitance: string | number; | ||
pin_count: number; | ||
ftype: "simple_resonator" | ||
frequency: number | ||
load_capacitance: string | number | ||
pin_count: number | ||
} | ||
|
||
expectTypesMatch<SourceSimpleResonator, InferredSourceSimpleResonator>(true); | ||
expectTypesMatch<SourceSimpleResonator, InferredSourceSimpleResonator>(true) |