Typescript compile error when add a prop in ContextMenuTrigger
Closed this issue · 2 comments
Version
2.11.0
Test Case
Steps to reproduce
When add a new prop in ContextMenuTrigger, an error in compiling typescript occurs:
For eg,
<ContextMenuTrigger id={ID} name ={'Test'} collect={collectProps} ...
I add a prop name in ContextMenuTrigger, when compiling the code, this message occurs:
TS2322: Type '{ children: never[]; id: string; name: string; collect: (props: any) => any; attributes: { className: string; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<ContextMenuTriggerProps, any, any>> & Re adonly<ContextMenuTriggerProps> & Readonly<{ children?: ReactNode; }>'. Property 'name' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<ContextMenuTriggerProps, any, any>> & Readonly<ContextMenuTriggerProps> & Readonly<{ children?: ReactNode; }>'.
However when converting to Javascript, it worked correctly.
Expected Behavior
Actual Behavior
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
+1