Expected 2 arguments, but got 1

I was facing this problem

Expected 2 arguments, but got 1.
[ng] 23    @ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;

It was solved adding the second parameter.

Before

 @ViewChild(ChildDirective) Component

After

 @ViewChild(ChildDirective, {static: false}) Component

This is a required parameter starting from Angular 8