Skip to content

Commit 8f4e75c

Browse files
pxlpaltscircuitbot
andauthored
Allow numeric internallyConnectedPins (#1161)
* Allow numeric internallyConnectedPins * formatbot: Automatically format code --------- Co-authored-by: tscircuitbot <[email protected]>
1 parent 7a65378 commit 8f4e75c

File tree

5 files changed

+225
-1
lines changed

5 files changed

+225
-1
lines changed

lib/components/base-components/NormalComponent/NormalComponent.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ export class NormalComponent<
101101
}
102102

103103
get internallyConnectedPinNames(): string[][] {
104-
return (
104+
const rawPins =
105105
this._parsedProps.internallyConnectedPins ??
106106
this.defaultInternallyConnectedPinNames
107+
return rawPins.map((pinGroup: (string | number)[]) =>
108+
pinGroup.map((pin: string | number) =>
109+
typeof pin === "number" ? `pin${pin}` : pin,
110+
),
107111
)
108112
}
109113

Lines changed: 20 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)