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
Type '{ children: Element[]; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ResizablePanel> & Readonly<{ children?: ReactNode;...'.
Type '{ children: Element[]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
Types of property 'children' are incompatible.
Type 'Element[]' is not assignable to type '[ReactNode, ReactNode]'.
Property '0' is missing in type 'Element[]'.
Imagine a component which requires some exact number of children passed.
Can it be currently expressed in TypeScript? Tuple doesn't work here.
Code
Expected behavior:
Pass.
Actual behavior:
Code
Expected behavior:
Fail, provided 3 nodes instead of 2.
Playground Link:
https://stackblitz.com/edit/react-ts-8tttua
The text was updated successfully, but these errors were encountered: