Giter VIP home page Giter VIP logo

Comments (5)

jmcdo29 avatar jmcdo29 commented on May 27, 2024 1

Repository was added in 2.1.0. I'll fix the format issue at a later time. The micro optimization was kept out for readability and I don't think it's going to make or break someones time controlled flow, but it's a good call out.

from nest-lab.

jmcdo29 avatar jmcdo29 commented on May 27, 2024

Thanks for pointing this out, I'll get it added. Shame it'll have to be added to npm as a patch for no real code change

from nest-lab.

micalevisk avatar micalevisk commented on May 27, 2024

I believe there's a place for a minor refactoring here:

return throwError(err);

- return throwError(err);
+ return throwError(() => err); 

image

And formatting

import { catchError, last, mergeMap, takeWhile} from 'rxjs/operators';

- import { catchError, last, mergeMap, takeWhile} from 'rxjs/operators';
+ import { catchError, last, mergeMap, takeWhile } from 'rxjs/operators';

😄

from nest-lab.

jmcdo29 avatar jmcdo29 commented on May 27, 2024

Good catch. Also, no clue why I haven't fixed this yet. Whoops

from nest-lab.

micalevisk avatar micalevisk commented on May 27, 2024

another one(?) would be on the following part

canActivate(context: ExecutionContext): Observable<boolean> {
this.guards = guards.map((guard) => this.modRef.get(guard));
const canActivateReturns: Array<Observable<boolean>> = this.guards.map(
(guard) => this.deferGuard(guard, context)
);

as that guard private field isn't used anywhere but on canActivate, why not just drop it (micro-optimization here)

canActivate(context: ExecutionContext): Observable<boolean> {
 const canActivateReturns: Array<Observable<boolean>> = guards.map(
   (guard) => this.deferGuard(this.modRef.get(guard), context)
 );
}

from nest-lab.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.