-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
CI check failing on main: TS2742 in telegram/bot.media.test-utils.ts #26011
Copy link
Copy link
Closed
Description
Bug
The check CI job is failing on all PRs due to a TypeScript error on main:
src/telegram/bot.media.test-utils.ts(5,14): error TS2742: The inferred type of 'cacheStickerSpy' cannot be named without a reference to '.pnpm/@[email protected]/node_modules/@vitest/spy'. This is likely not portable. A type annotation is necessary.
src/telegram/bot.media.test-utils.ts(6,14): error TS2742: The inferred type of 'getCachedStickerSpy' cannot be named without a reference to '.pnpm/@[email protected]/node_modules/@vitest/spy'. This is likely not portable. A type annotation is necessary.
src/telegram/bot.media.test-utils.ts(7,14): error TS2742: The inferred type of 'describeStickerImageSpy' cannot be named without a reference to '.pnpm/@[email protected]/node_modules/@vitest/spy'. This is likely not portable. A type annotation is necessary.
This blocks the check gate, which prevents build-artifacts, checks, and checks-windows from running.
Fix
Add explicit type annotations to the exported spy variables in src/telegram/bot.media.test-utils.ts, e.g.:
import type { Mock } from "vitest";
export const cacheStickerSpy: Mock = vi.fn();Related
Similar to #16512 and #17315 (both closed, different files).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.