How to use the tsyringe.container.createChildContainer function in tsyringe

To help you get started, we’ve selected a few tsyringe 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 Arianee / arianeeJS / src / core / wallet / wallet.ts View on Github external
public constructor (configuration:ClassicConfiguration) {
      this.container = container.createChildContainer();

      this.registerSingletons(
        ContractService,
        WalletService,
        Web3Service,
        POAAndAriaService,
        WalletService,
        ArianeeEventEmitter,
        BlockchainEventWatcherService,
        CertificateAuthorizationService);

      const walletService:WalletService = this.container.resolve(WalletService);
      const configService:ConfigurationService = this.container.resolve(ConfigurationService);

      walletService.bdhVaultURL = configuration.bdHVaultURL;

tsyringe

Lightweight dependency injection container for JavaScript/TypeScript

MIT
Latest version published 1 year ago

Package Health Score

71 / 100
Full package analysis