-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the bug
The pnpm typecheck command fails with errors in src/sharedcomponents/postCard/PostCard.spec.tsx.
The test attempts to render PostCard with video and image props, but the TypeScript compiler reports that these properties do not exist on Partial.
This appears to be caused by a duplicate definition of InterfacePostCard:
- src/utils/interfaces.ts: Defines InterfacePostCard without image and video properties.
- src/types/Post/interface.ts: Defines InterfacePostCard with image and video properties.
The test file is likely complying with the definition from src/utils/interfaces.ts, causing the mismatch.
To Reproduce
Steps to reproduce the behavior:
- Checkout the current branch.
- Run pnpm install.
- Run pnpm typecheck.
Expected behavior
The type check should pass, and the PostCard interface should be consistent across the application to support the video and image props used in tests/components.
Actual behavior
Screenshots
If applicable, add screenshots to help explain your problem.
Additional details
Conflicting Definitions:
- src/utils/interfaces.ts (Lines ~2271)
- src/types/Post/interface.ts (Lines ~3)
The codebase should ideally be refactored to use a single source of truth for InterfacePostCard.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status