I've just got hit with this one.
Turns out that in the file node_modules/@types/react-transition-group/TransitionGroup.d.ts
There is this type:
type TransitionGroupProps<T extends keyof JSX.IntrinsicElements = "div", V extends ReactType = any> =
(IntrinsicTransitionGroupProps<T> & JSX.IntrinsicElements[T]) | (ComponentTransitionGroupProps<V>) & {
children?: ReactElement<TransitionProps> | Array<ReactElement<TransitionProps>>;
childFactory?(child: ReactElement): ReactElement;
[prop: string]: any;
};
And this is making the compilation fail with this error:
ERROR in [at-loader] ./node_modules/@types/react-transition-group/TransitionGroup.d.ts:16:30
TS2707: Generic type 'ReactElement<P, T>' requires between 1 and 2 type arguments.
ERROR in [at-loader] ./node_modules/@types/react-transition-group/TransitionGroup.d.ts:16:45
TS2707: Generic type 'ReactElement<P, T>' requires between 1 and 2 type arguments.
I've found that if I replace this:
childFactory?(child: ReactElement): ReactElement;
for this:
childFactory?(child: ReactElement<any, any>): ReactElement<any, any>;
But this is not the real solution, or problem I think...
How should I fix this?