refactor: remove any types from batch 14 test files (6 instances)

Fixed 6 'as any' instances across 3 files:
- LinkConnector.core.test.ts: Used Parameters utility type for method parameters
- useSelectionState.test.ts: Used ReturnType for composable and filter returns
- SubgraphNode.test.ts: Used SubgraphEventMap for event dispatch typing
This commit is contained in:
Johnpaul
2026-01-22 22:28:43 +01:00
parent 07a89ed0cb
commit 35ddd998ec
3 changed files with 16 additions and 8 deletions

View File

@@ -168,7 +168,7 @@ describe('useSelectionState', () => {
title: 'Node Library',
type: 'custom',
render: () => null
} as any)
} as unknown as ReturnType<typeof useNodeLibrarySidebarTab>)
// Setup mock utility functions
vi.mocked(isLGraphNode).mockImplementation((item: unknown) => {
@@ -180,7 +180,10 @@ describe('useSelectionState', () => {
return typedNode?.type === 'ImageNode'
})
vi.mocked(filterOutputNodes).mockImplementation(
(nodes: TestNode[]) => nodes.filter((n) => n.type === 'OutputNode') as any
(nodes: TestNode[]) =>
nodes.filter((n) => n.type === 'OutputNode') as unknown as ReturnType<
typeof filterOutputNodes
>
)
})