@tscircuit/soup v0.0.21
@tscircuit/soup
tscircuit · Soup Specification Docs
“tscircuit soup” is the name of the compiled intermediary low-level JSON circuit representation. It contains all the information needed to visually represent a schematic, PCB, produce Gerber files, produce bill of materials, run SPICE simulations, view warnings and more. It is designed to easily interoperate with a SQL database.
This module has the zod definitions and conversion functions for using tscircuit soup.
!INFO This is mostly an internal module, you probably want to use the main tscircuit library instead.
import { any_soup_element, simple_source_resistor } from "@tscircuit/soup"
import type { SourceSimpleResistor } from "@tscircuit/soup"
const resistor: SourceSimpleResistor = simple_source_resistor.parse({
type: "source_component",
ftype: "simple_resistor",
source_component_id: "source_component_1",
name: "R1",
resistane: "1k",
})
console.log(resistor.resistance) // 1000
// This is the common way to parse/transform any element
any_soup_element.parse({
/* ... */
})
23 days ago
23 days ago
23 days ago
23 days ago
27 days ago
29 days ago
29 days ago
28 days ago
28 days ago
28 days ago
28 days ago
28 days ago
29 days ago
30 days ago
30 days ago
30 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago