UNPKG

@skillpet/circuit

Version:

Circuit diagram library — render electrical schematics from JSON, with interactive SVG, themes, and Vue/React components

66 lines (65 loc) 1.9 kB
/** * Switches — aligned with Python `elements/switches.py`. */ import { Element } from "../element.js"; import { Element2Term } from "../element2term.js"; export type SwitchAction = "open" | "close" | undefined; export declare class Switch extends Element2Term { constructor(userParams?: Record<string, unknown> & { action?: SwitchAction; contacts?: boolean; nc?: boolean; }); } export declare class SwitchSpdt extends Switch { constructor(userParams?: Record<string, unknown> & { action?: SwitchAction; contacts?: boolean; }); } export declare class SwitchSpdt2 extends Element { constructor(userParams?: Record<string, unknown> & { action?: SwitchAction; contacts?: boolean; }); } export declare class Button extends Element2Term { constructor(userParams?: Record<string, unknown> & { nc?: boolean; contacts?: boolean; }); } export declare class SwitchDpst extends Element { constructor(userParams?: Record<string, unknown> & { link?: boolean; contacts?: boolean; }); } export declare class SwitchDpdt extends Element { constructor(userParams?: Record<string, unknown> & { link?: boolean; contacts?: boolean; }); } export declare class SwitchReed extends Element2Term { constructor(userParams?: Record<string, unknown>); } export declare class SwitchRotary extends Element { constructor(userParams?: Record<string, unknown> & { n?: number; dtheta?: number; theta0?: number; radius?: number; arrowlen?: number; arrowcontact?: number; }); } export declare class SwitchDIP extends Element { constructor(userParams?: Record<string, unknown> & { n?: number; pattern?: boolean[]; switchcolor?: string; swidth?: number; spacing?: number; }); }