You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I typecheck my code, I get a type error in the new PrimeReact 9.3.0. It looks like there are 5 new required properties (I think they should be optional with default fallbacks?)
No overload matches this call.
Overload 1 of 2, '(props: ImageProps | Readonly<ImageProps>): Image', gave the following error.
Type '{ src: string; width: string; preview: true; downloadIcon: true; rotateRightIcon: true; rotateLeftIcon: true; zoomOutIcon: true; }' is missing the following properties from type 'Readonly<ImageProps>': zoomInIcon, closeIcon
Overload 2 of 2, '(props: ImageProps, context: any): Image', gave the following error.
Type '{ src: string; width: string; preview: true; downloadIcon: true; rotateRightIcon: true; rotateLeftIcon: true; zoomOutIcon: true; }' is missing the following properties from type 'Readonly<ImageProps>': zoomInIcon, closeIconts(2769)
mertsincan
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Apr 20, 2023
Describe the bug
When I typecheck my code, I get a type error in the new PrimeReact 9.3.0. It looks like there are 5 new required properties (I think they should be optional with default fallbacks?)
Reproducer
https://stackblitz.com/edit/react-rx4x7u?file=src%2FApp.tsx
PrimeReact version
9.3.0
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 111.0.5563.149
Steps to reproduce the behavior
Use an Image component with the defaults listed in the docs:
Expected behavior
5 icon props should be optional and have default fallbacks
The text was updated successfully, but these errors were encountered: