score:3

Accepted answer

I removed Component from destruction and casted type like this

const Component = this.props.component as React.ComponentType<{} & RouteComponentProps<{}>>;

This worked for me. I read it from here. https://github.com/DefinitelyTyped/DefinitelyTyped/issues/17355#issuecomment-310544041

score:0

You should change PrivateRouteProps

{ component: typeof React.Component };

Should be

{ component: React.Component };

Related Query

More Query from same tag