Dimiss InfiniteScroll spinner

i am using the InfiniteScroll to display my data.
when the fetching of data is end. the spinner load still exisit.
doInfinite(): Promise {
console.log(‘Begin async operation’);

return new Promise((resolve) => {
  setTimeout(() => {
    for (var i = 0; i < 30; i++) {
      this.items.push( this.items.length );

    console.log('Async operation has ended');
  }, 500);

how to dismiss that.
thank you in advance

The docs where you apparently cribbed this code from describe this exactly: you have to accept a parameter to the pull event and call complete() on it.