title: error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<boolean>', After Updating angular from 6.2 to 7.2
body: <pre><code>import { of as observableOf, Observable } from 'rxjs';
  import { mergeMap } from 'rxjs/operators';
  import { Injectable, Injector } from '@angular/core';
  import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateChild } from '@angular/router';
  
  @Injectable()
  export class MasterGuard implements CanActivate, CanActivateChild {
    constructor(private readonly injector: Injector) {}
    canActivate(
      next: ActivatedRouteSnapshot,
      state: RouterStateSnapshot
    ): Observable&lt;boolean&gt; | Promise&lt;boolean&gt; | boolean {
      if (next.data.guards.canActivate &amp;&amp; next.data.guards.canActivate.length &gt; 0) {
        return this.executeGuardsCanActivate(next.data.guards.canActivate, next, state);
      } else {
        return true;
      }
    }
  
    executeGuardsCanActivate(guards, next: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
      let start = observableOf(true);
      guards.forEach(guard =&gt; {
        start = start.pipe(
          mergeMap(x =&gt; {
            if (x) {
              return this.injector.get(guard).canActivate(next, state);
            } else {
              return observableOf(false);
            }
          })
        );
      });
  
      return start;
    }
  }
  </code></pre>
  
  <p>Above is the code which throws error while compiling after angular update from 6 to 7. Any help ?</p>
  
  <p>ERROR in src/app/shared/guards/master.guard.ts(35,7): error TS2322: Type 'Observable&lt;{}>' is not assignable to type 'Observable'.
    Type '{}' is not assignable to type 'boolean'.
  src/app/shared/guards/master.guard.ts(52,7): error TS2322: Type 'Observable&lt;{}>' is not assignable to type 'Observable'.</p>
  
  <p>Routing code</p>
  
  <pre><code>const routes: Routes = [
    {
      path: 'dashboard',
      component: DashboardComponent,
      canActivate: [MasterGuard],
      data: {
        guards: {
          canActivate: [AuthGuard, UserInformationGuard]
        }
      }
    },
  </code></pre>