Skip to content

Commit ff5944b

Browse files
lheinclaude
andcommitted
fix(topology): drop redundant union with unknown in test helper
SonarCloud flagged typescript:S6571 — `ReturnType<typeof node> | unknown` collapses to just `unknown`. Use `unknown` directly for the source/target parameters of the wireEdge helper. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3d2da75 commit ff5944b

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

packages/ui/src/pages/Topology/OrthogonalBendpointsEdge.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ const node = (pos: { x: number; y: number }, size: { width: number; height: numb
88
getDimensions: () => size,
99
});
1010

11-
const wireEdge = (
12-
edge: OrthogonalBendpointsEdge,
13-
layout: string,
14-
source: ReturnType<typeof node> | unknown,
15-
target: ReturnType<typeof node> | unknown,
16-
) => {
11+
const wireEdge = (edge: OrthogonalBendpointsEdge, layout: string, source: unknown, target: unknown) => {
1712
jest.spyOn(edge, 'getSource').mockReturnValue(source as never);
1813
jest.spyOn(edge, 'getTarget').mockReturnValue(target as never);
1914
jest.spyOn(edge, 'getGraph').mockReturnValue({ getLayout: () => layout } as never);

0 commit comments

Comments
 (0)