mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-22 21:38:52 +00:00
fix(ext-api/tests): partial TypeScript cleanup in BC tests
- Prefix unused variable with _ (cleanups → _cleanups) - Use globalThis.setInterval for portable timer type - Prefix unused nodeType param with _ Note: Pre-existing TS errors in other files remain (lazy-serialize, bc-04, etc.) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,7 @@ describe('BC.02 migration — node lifecycle: teardown', () => {
|
||||
const v1Ticks = vi.fn()
|
||||
const v2Ticks = vi.fn()
|
||||
|
||||
let v2Handle: number | undefined
|
||||
let v2Handle: ReturnType<typeof globalThis.setInterval> | undefined
|
||||
|
||||
// v1 pattern: manual tracking
|
||||
const v1Handle = setInterval(v1Ticks, 100)
|
||||
|
||||
@@ -182,7 +182,7 @@ describe('BC.02 v2 contract — node lifecycle: teardown', () => {
|
||||
it('interval cleared in onScopeDispose does not fire after unmount', () => {
|
||||
vi.useFakeTimers()
|
||||
const intervalCallback = vi.fn()
|
||||
let handle: number | undefined
|
||||
let handle: ReturnType<typeof globalThis.setInterval> | undefined
|
||||
|
||||
const { unmount } = mountNode(() => {
|
||||
handle = setInterval(intervalCallback, 100)
|
||||
|
||||
Reference in New Issue
Block a user