Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Anshgrover23 committed Dec 20, 2024
1 parent ae8ee0f commit fa80e1d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/source/source_simple_resonator.ts
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)

0 comments on commit fa80e1d

Please sign in to comment.