Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compile after update rxjs 7.2.0 #1204

Closed
Toso82 opened this issue Jul 20, 2021 · 2 comments
Closed

Not compile after update rxjs 7.2.0 #1204

Toso82 opened this issue Jul 20, 2021 · 2 comments

Comments

@Toso82
Copy link

Toso82 commented Jul 20, 2021

Describe the bug

After update to "rxjs": "^7.2.0",

Error: node_modules/angular-auth-oidc-client/lib/auto-login/auto-login-all-routes.guard.d.ts:14:5 - error TS2416: Property 'canLoad' in type 'AutoLoginAllRoutesGuard' is not assignable to the same property in base type 'CanLoad'.
  Type '(route: Route, segments: UrlSegment[]) => Observable<boolean>' is not assignable to type '(route: Route, segments: UrlSegment[]) => boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree>'.
    Type 'Observable<boolean>' is not assignable to type 'boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree>'.

14     canLoad(route: Route, segments: UrlSegment[]): Observable<boolean>;
       ~~~~~~~


Error: node_modules/angular-auth-oidc-client/lib/auto-login/auto-login-all-routes.guard.d.ts:15:5 - error TS2416: Property 'canActivate' in type 'AutoLoginAllRoutesGuard' is not assignable to the same property in base type 'CanActivate'.
  Type '(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Observable<boolean>' is not assignable to type '(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => boolean | UrlTree 
| Observable<boolean | UrlTree> | Promise<...>'.
    Type 'Observable<boolean>' is not assignable to type 'boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree>'.
      Type 'Observable<boolean>' is not assignable to type 'Observable<boolean | UrlTree>'.
        The types of 'source.operator.call' are incompatible between these types.
          Type '(subscriber: import("E:/Angular/VReport/node_modules/angular-auth-oidc-client/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("E:/Angular/VReport/node_modules/angular-auth-oidc-client/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("E:/Angular/VReport/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>, source: any) => import("E:/Angular/VReport/node_modules/rxjs/dist/types/internal/types").TeardownLogic'.
            Types of parameters 'subscriber' and 'subscriber' are incompatible.
              Type 'Subscriber<any>' is missing the following properties from type 'Subscriber<any>': syncErrorValue, syncErrorThrown, syncErrorThrowable, _unsubscribeAndRecycle, and 2 more.

15     canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>;
       ~~~~~~~~~~~


Error: node_modules/angular-auth-oidc-client/lib/interceptor/auth.interceptor.d.ts:14:5 - error TS2416: Property 'intercept' in type 'AuthInterceptor' is not assignable to the same property in base type 'HttpInterceptor'.
  Type '(req: import("E:/Angular/VReport/node_modules/@angular/common/http/http").HttpRequest<any>, next: import("E:/Angular/VReport/node_modules/@angular/common/http/http").HttpHandler) => import("E:/Angular/VReport/node_modules/angular-auth-oidc-client/node_modules/rxjs/internal/Observable").Observable<...>' is not assignable to type '(req: import("E:/Angular/VReport/node_modules/@angular/common/http/http").HttpRequest<any>, next: import("E:/Angular/VReport/node_modules/@angular/common/http/http").HttpHandler) => import("E:/Angular/VReport/node_modules/rxjs/dist/types/internal/Observable").O    Call signature return types 'Observable<HttpEvent<any>>' and 'Observable<HttpEvent<any>>' are incompatible.
      The types of 'source' are incompatible between these types.
        Type 'import("E:/Angular/VReport/node_modules/angular-auth-oidc-client/node_modules/rxjs/internal/Observable").Observable<any>' is not assignable to type 'import("E:/Angular/VReport/node_modules/rxjs/dist/types/internal/Observable").Observable<any>'.

14     intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
       ~~~~~~~~~

To Reproduce
Steps to reproduce the behavior:

  1. ng serve

Enviroment

Angular CLI: 12.1.2
Node: 16.4.0 (Unsupported)
Package Manager: npm 7.19.1
OS: win32 x64

Angular: 12.1.2
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, localize, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1201.2
@angular-devkit/build-angular   12.1.2
@angular-devkit/core            12.1.2
@angular-devkit/schematics      12.1.2
@angular/flex-layout            12.0.0-beta.34
@schematics/angular             12.1.2
rxjs                            7.2.0
typescript                      4.3.4
@FabianGosebrink
Copy link
Collaborator

FabianGosebrink commented Jul 20, 2021

Hey, thanks for reporting. The lib is developed, tested and compatible with the A12 compatible Version of rxjs.

https://github.com/damienbod/angular-auth-oidc-client/blob/main/package.json#L69

You are currently using another major version even (major = breaking changes). Same as in #1178 and #1202

@damienbod
Copy link
Owner

This lib targets Angular 12

Greetings Damien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants