RxJS 6 switchMap Deprecated Symbol used

The resultSelector function given as the second argument to switchMap is deprecated. You need to remove this and achieve the goal using map operator.

The trickiest part here is to decide where to put the map operator. Actually the map operator to go inside the body of the function provided as the argument of switchMap.

The code without the result selector function will be something like the following:

     .pipe(
          map(job => job[0]),
          switchMap((job) => {
            return (job ? this.bookingService.findByID(job.property.id) : Observable.empty()).pipe(

              // This is the mapping function provided as the alternative to the deprecated result selector function
              // This should be placed inside the body of the function which is the 1st (and only one) argument of switchMap
              map((bookings: Booking[])=>{
              this.mark_jobs_unavailable(job, bookings);
              return job;
            })

            );
          }     
         )
        )

.pipe(
  map(job => job[0]),
  switchMap((job) => {
    return job ? this.bookingService.findByID(job.property.id).pipe(
      map((bookings: Booking[]) => {
        return {
          job: job,
          bookings: bookings
        };
      })
    ) : Observable.empty();
  }
).subscribe((job, bookings: Booking[]) => {
  ...
})