How to use the @nestjs/common.Inject function in @nestjs/common

To help you get started, weโ€™ve selected a few @nestjs/common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github charjac / nest-boilerplate / src / auth / providers / github.component.ts View on Github external
constructor(
    private env: Env,
    private http: Http,
    @Inject('I18n') private i18n: I18n,
  ) {}
github BMalaichik / nestjs-starter-kit / packages / backend / src / modules / user / user.controller.ts View on Github external
public constructor(
        @Inject(UserDiToken.USER_SERVICE) private readonly userService: UserService,
    ) { }
github santaz1995 / nestjs-cqrs-starter / src / application / event / feedback / create-feedback.handler.ts View on Github external
constructor(
        @Inject('FeedbackQueryRepository') private feedbackRepository: FeedbackCommandRepository) {
    }
github chanlito / nestjs-extensions / src / typeorm / typeorm.decorators.ts View on Github external
export const InjectRepository = (entity: Function) => Inject(getRepositoryToken(entity));
github bojidaryovchev / nest-angular / src / server / modules / auth / auth.service.ts View on Github external
constructor(
    @Inject(USER_MODEL_TOKEN) private readonly userModel: Model,
    @Inject(FACEBOOK_CONFIG_TOKEN) private readonly fbConfig: IFacebookConfig,
    @Inject(TWITTER_CONFIG_TOKEN) private readonly twitterConfig: ITwitterConfig,
    @Inject(GOOGLE_CONFIG_TOKEN) private readonly googleConfig: IGoogleConfig
  ) {
    this.url = `${SERVER_CONFIG.httpProtocol}://${SERVER_CONFIG.domain}:${SERVER_CONFIG.httpPort}`;
  }
github Roche / lxdhub / packages / dbsync / src / operating-system / operating-system.service.ts View on Github external
constructor(
        @InjectRepository(OperatingSystem)
        private operatingSystemRepository: Repository,
        private lxdService: LXDService,
        @Inject('LXDHubDbSyncSettings')
        private dbSyncSettings: LXDHubDbSyncSettings
    ) {
        this.logger = new Logger('OperatingSystemService');
    }
github Roche / lxdhub / packages / api / src / image / image.service.ts View on Github external
constructor(
        private readonly imageRepository: ImageRepository,
        private readonly imageListItemFactory: ImageListItemFactory,
        private readonly imageDetailFactory: ImageDetailFactory,
        private readonly searchService: SearchService,
        private readonly remoteService: RemoteService,
        @Inject('ImageSearchDictionary')
        private readonly imageSearchDictionary: SearchDictionary[],
        @Inject('LXDService')
        private readonly lxdService: LXDService,
    ) { }
github MarcinMiler / tinder-clone / packages / server / src / modules / like / like.resolver.ts View on Github external
constructor(
        @Inject('PubSub') private readonly pubSub: PubSub,
        private readonly likeService: LikeService
    ) {}
github nestjs / azure-database / lib / table-storage / azure-table.repository.ts View on Github external
constructor(
    private readonly manager: AzureTableStorageService,
    @Inject(AZURE_TABLE_STORAGE_NAME) private readonly tableName,
  ) {}