From 9a7b3efa947029404658eb5ca9442799a6bdc955 Mon Sep 17 00:00:00 2001 From: Lirian Su Date: Mon, 25 May 2026 13:01:45 +0800 Subject: [PATCH] fix(cli): align snapshot's local InjectFn return type with engine `injectVideoFramesBatch` now returns `Promise` so the caller can filter cache entries to videos the page actually painted. The cli-side snapshot command does not use the return value, but its local `InjectFn` declared `Promise` which made the `as { injectVideoFramesBatch: InjectFn }` cast on the dynamic engine import fail typecheck under TS's "sufficiently overlapping types" rule. Match the engine's actual export shape. --- packages/cli/src/commands/snapshot.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/snapshot.ts b/packages/cli/src/commands/snapshot.ts index a05292339..24cbb0470 100644 --- a/packages/cli/src/commands/snapshot.ts +++ b/packages/cli/src/commands/snapshot.ts @@ -232,10 +232,16 @@ async function captureSnapshots( // Chrome-headless ignores programmatic