title: Service inheritance in Nestjs and controllers
body: <p>I'm trying to write some generic code for user module, that will be easy to extend.
  I'm having trouble with dependencies. I have UserService, User entity, ExtendedUserService and ExtendedUserModule and ExtendedUserController.</p>
  <p>I want to define that the ExtendedUserController will receive a service that extends typeof UserService (because I want this controller to be used in modules, and on save I want to save more info using any relevant service  ).</p>
  <pre><code>export class EmailUserController {
      constructor(
          private readonly emailService: UserService
      ) {
  </code></pre>
  <p>If I do so, I have problem of dependencies when I send ExtendedUserService,even though it extends UserService.</p>
  <blockquote>
  <p>Nest can't resolve dependencies of the EmailUserController (?). Please make sure that the argument UserService at index [0] is available in the EmailUserModule context.</p>
  </blockquote>
  <p>The module looks that way:</p>
  <pre><code>@Module({
      imports: [
          RoleModule,
          TypeOrmModule.forFeature([EmailUser]),
          JwtModule.register({
              secret: jwtConstants.secret,
              signOptions: { expiresIn: '100min' },
          })
      ],
      providers: [
          EmailUserService, // Extends UserService
          {
              provide: 'CONFIG_OPTIONS',
              useValue: options,
          },
      ],
      exports: [EmailUserService],
      controllers: [EmailUserController]
  })
  </code></pre>
  <p>Any idea?
  Thanks!</p>