title: Nest can't resolve dependencies of guard wrapped inside a decorator
body: <p>I'm trying to inject a provider inside a guard that is wrapped in a decorator, but Nest is not being able to resolve dependencies, giving me the next error:</p>
  
  <pre><code>[ExceptionHandler] Nest can't resolve dependencies of the SecuredGuard (Reflector, ?). Please make sure that the argument at index [1] is available in the SecuredGuard context.
  </code></pre>
  
  <p>The main purpose of my approach is to avoid using two separate decorators like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>
  @Controller()
  export class AppController {
  
    @Get()
    @Secured('admin')
    @UseGuards(SecuredGuard)
    getHello(): string {
      return this.appService.getHello();
    }
  
  }
  </code></pre>
  
  <p>And instead insert the <code>@UseGuards(SecuredGuard)</code> inside my custom decorator <code>@Secured('admin')</code> so it ends up like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>@Controller()
  export class AppController {
  
    @Get()
    @Secured('admin')
    getHello(): string {
      return this.appService.getHello();
    }
  
  }
  </code></pre>
  
  <p>This is how I'm implementing my custom decorator:</p>
  
  <pre class="lang-js prettyprint-override"><code>export function Secured(...roles: string[]){ 
  
      const setMetadata = ReflectMetadata('roles', roles)
      const setupGuard = UseGuards(SecuredGuard)
  
      return (target: any, key?: string, descriptor?: any) =&gt; {
          setMetadata(target, key, descriptor);
          setupGuard(target, key, descriptor);
      }
  
  }
  </code></pre>
  
  <p>And this is my <code>SecuredGuard</code>, the <code>AuthService</code> is the dependency that couldn't be resolved:</p>
  
  <pre class="lang-js prettyprint-override"><code>@Injectable()
  export class SecuredGuard implements CanActivate {
  
    constructor(
      private readonly _reflector: Reflector,
      private readonly _authService: AuthService
    ) { }
  
    async canActivate(context: ExecutionContext): Promise&lt;boolean&gt; {...}
  }
  
  </code></pre>
  
  <p>Both <code>secured.guard.ts</code> and <code>secured.decorator.ts</code> are part of <code>secured.module.ts</code></p>
  
  <pre class="lang-js prettyprint-override"><code>@Module({
      imports: [
          SecuredGuard,
          AuthModule
      ],
      exports: [
          SecuredGuard
      ],
      providers: [
          AuthService
      ]
  })
  export class SecuredModule {}
  </code></pre>
  
  <p>Which is using the <code>AuthService</code> being exported from <code>auth.module.ts</code></p>
  
  <pre><code>@Module({
    controllers: [
      AuthController
    ],
    providers: [
      AuthService
    ],
    imports: [
      EmailModule
    ],
    exports: [
      AuthService
    ]
  })
  export class AuthModule { }
  </code></pre>
  
  <p>And <code>secured.module.ts</code> is being imported by <code>app.module.ts</code></p>
  
  <pre class="lang-js prettyprint-override"><code>@Module({
    imports: [
      SecuredModule
    ],
    controllers: [
      AppController
    ],
    providers: [
      AppService
    ],
  })
  export class AppModule { }
  </code></pre>
  
  <p>I don't know if I'm using the appropriate approach, or even if it's possible what I'm trying to do, any clues would be really appreciated!</p>