problem description
when traversing ReactChildren with React.Children.forEach, you need to determine the type of child based on the attribute you hang, but writing child.type directly will cause an error: the attribute "type" does not exist on the
[ts] type "ReactChild".
tried to define interface, but to no avail.
interface ReactChild{
type: string;
}
seek the answer of the Great God