Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
| `<testpoint />` | [`TestpointProps`](#testpointprops-testpoint) |
| `<transistor />` | [`TransistorProps`](#transistorprops-transistor) |
| `<via />` | [`ViaProps`](#viaprops-via) |
| `<voltageprobe />` | [`VoltageProbeProps`](#voltageprobeprops-voltageprobe) |
| `<voltagesource />` | [`VoltageSourceProps`](#voltagesourceprops-voltagesource) |

<!-- COMPONENT_TABLE_END -->
Expand Down Expand Up @@ -1082,6 +1083,16 @@ export interface ViaProps extends CommonLayoutProps {

[Source](https://github.com/tscircuit/props/blob/main/lib/components/via.ts)

### VoltageProbeProps `<voltageprobe />`

```ts
export interface VoltageProbeProps extends CommonComponentProps {
connectsTo: string | string[];
}
```

[Source](https://github.com/tscircuit/props/blob/main/lib/components/voltageprobe.ts)

### VoltageSourceProps `<voltagesource />`

```ts
Expand Down
11 changes: 11 additions & 0 deletions generated/COMPONENT_TYPES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,17 @@ export const viaProps = commonLayoutProps.extend({
})
```

### voltageprobe

```typescript
export interface VoltageProbeProps extends CommonComponentProps {
connectsTo: string | string[]
}
export const voltageProbeProps = commonComponentProps.extend({
connectsTo: z.string().or(z.array(z.string())),
})
```

### voltagesource

```typescript
Expand Down
5 changes: 5 additions & 0 deletions generated/PROPS_OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,11 @@ export interface ViaProps extends CommonLayoutProps {
}


export interface VoltageProbeProps extends CommonComponentProps {
connectsTo: string | string[]
}


export interface VoltageSourceProps<PinLabel extends string = string>
extends CommonComponentProps<PinLabel> {
voltage?: number | string
Expand Down
16 changes: 16 additions & 0 deletions lib/components/voltageprobe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {
type CommonComponentProps,
commonComponentProps,
} from "lib/common/layout"
import { expectTypesMatch } from "lib/typecheck"
import { z } from "zod"

export interface VoltageProbeProps extends CommonComponentProps {
connectsTo: string | string[]
}

export const voltageProbeProps = commonComponentProps.extend({
connectsTo: z.string().or(z.array(z.string())),
})

expectTypesMatch<VoltageProbeProps, z.input<typeof voltageProbeProps>>(true)
1 change: 1 addition & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export * from "./components/cadassembly"
export * from "./components/cadmodel"
export * from "./components/power-source"
export * from "./components/voltagesource"
export * from "./components/voltageprobe"
export * from "./components/schematic-arc"
export * from "./components/schematic-box"
export * from "./components/schematic-circle"
Expand Down