Skip to content
Merged
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
15 changes: 15 additions & 0 deletions docs/guides/using-sel-references.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,21 @@ customNets.CUSTOMNET2 // "net.CUSTOMNET2"
// customNets.DOES_NOT_EXIST // TypeScript error!
```

### Collecting Typed Nets

You may want to group your typed nets alongside other reusable selectors:

```tsx
import { sel } from "tscircuit"

const selectors = {
net: sel.net<"GND" | "VCC" | "V5">(),
// ...other selectors
}

selectors.net.GND // "net.GND"
```

### Dynamic Reference Designators

You can call `sel` as a function to create selectors for any reference designator.
Expand Down