mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
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:
@@ -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
|
||||
>
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user