using mergeMap to return a Observable void – good practice questions

I am reading some existing code, and i find it interesting the way the same data is simultaneously used as argument and return value (prepareData() method) – I wonder how much of a bad practice this is.

And how we are using mergeMap and returning Observable void in loadMyData method.

Headsup that I copied code I didn’t write, and renamed variables and types, just trying to understand how correct this code is, and if you would improve it in any obvious way.

My knowledge of RxJs is very basic and I am just trying to learn.

 public prepareData(values: myTypeArr[]): Observable<myTypeArr[]> {
   return this.loadMyData().pipe(take(1),
   map(() => {
     values.forEach((value) => {
       // add value to data in store
       this.assignValueToStore(value);
     });
     return values;
   }))
 }

loadMyData() looks like this.

public loadMyData(): Observable<void> {
  this.logger.info('Loading data.');

  return this.myService.apiDataGet().pipe(
    map((responseArr: responseType[]) => {
      //Reset an internal state
      this.resetState({});
      this.logger.info(`Got ${responseArr.length} items from API.`);
      return responseArr;
    }),
    mergeMap(responseArr=> {
      return this.addItemsToStore(responseArr); //this will return Observable<void>
    })
  );
}