feat: add fanout autorouter phase props - #760
Conversation
| test("supports fanout presets", () => { | ||
| expect(autorouterProp.parse("single_layer_fanout")).toBe( | ||
| "single_layer_fanout", | ||
| ) | ||
| expect(autorouterProp.parse("fanout")).toBe("fanout") | ||
| expect(autorouterProp.parse({ preset: "fanout" })).toMatchObject({ | ||
| preset: "fanout", | ||
| }) | ||
| }) |
There was a problem hiding this comment.
A *.test.ts file may have AT MOST one test(...) call. This file already contained at least one test(...) before this PR, and the new test("supports fanout presets", ...) block adds another. The file should be split into multiple numbered files, e.g. autorouter1.test.ts, autorouter2.test.ts, etc., each containing exactly one test(...) call.
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
| test("autorouting phase accepts per-bus fanout directions", () => { | ||
| const raw = { | ||
| autorouter: "fanout", | ||
| busFanoutDirections: { | ||
| DATA: "top_right", | ||
| CONTROL: { direction: "center_left" }, | ||
| }, | ||
| } satisfies AutoroutingPhaseProps | ||
|
|
||
| expect(autoroutingPhaseProps.parse(raw)).toEqual(raw) | ||
| }) |
There was a problem hiding this comment.
A *.test.ts file may have AT MOST one test(...) call. This file already contained multiple test(...) calls before this PR, and the new test("autorouting phase accepts per-bus fanout directions", ...) block adds yet another. The file should be split into multiple numbered files, e.g. autoroutingphase1.test.ts, autoroutingphase2.test.ts, etc., each containing exactly one test(...) call.
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
Summary
single_layer_fanoutandfanoutas first-class autorouter presetsbusFanoutDirectionsto<autoroutingphase>asRecord<BusName, NinePointAnchor | { direction: NinePointAnchor }>centerleaving a bus unconstrained<bus>limited to electrical connection membershipNinePointAnchorandBusNametypescircuit-jsondependency with coreFanout direction is routing-phase policy keyed by bus name. The props API does not require a component selector; the fanout solver infers the footprint side that needs escaping.
This is the props prerequisite for tscircuit/core#2889.
Validation
bun test(387 passing)bun run typecheckbun run buildbun run check-circular-depsbun run format:checkgit diff --check