How to use the tsyringe.container.resolve 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 ueokande / vim-vixen / src / content / index.ts View on Github external
import 'reflect-metadata';

import Application from './Application';
import consoleFrameStyle from './site-style';
import { ConsoleFramePresenterImpl } from './presenters/ConsoleFramePresenter';
import { container } from 'tsyringe';
import './di';

if (window.self === window.top) {
  new ConsoleFramePresenterImpl().initialize();
}

try {
  const app = container.resolve(Application);
  app.run();
} catch (e) { console.error(e); }

const style = window.document.createElement('style');
style.textContent = consoleFrameStyle;
window.document.head.appendChild(style);
github Arianee / arianeeJS / src / core / wallet / wallet.ts View on Github external
public get globalConfiguration () {
      return container.resolve(GlobalConfigurationService);
    }
}
github ueokande / vim-vixen / src / background / index.ts View on Github external
import 'reflect-metadata';
import { container } from 'tsyringe';
import Application from './Application';

const app = container.resolve(Application);
app.run();
github Arianee / arianeeJS / src / core / wallet / walletBuilder.ts View on Github external
constructor (private arianeeConfig: ArianeeConfig) {
    container.resolve(ConfigurationService).arianeeConfiguration = arianeeConfig;
    this.web3 = container.resolve(Web3Service).web3;
  }
github Arianee / arianeeJS / src / core / arianee / arianee.ts View on Github external
constructor () {
    this.globalConfigurationService = container.resolve(GlobalConfigurationService);
  }
github Arianee / arianeeJS / src / core / wallet / walletBuilder.ts View on Github external
constructor (private arianeeConfig: ArianeeConfig) {
    container.resolve(ConfigurationService).arianeeConfiguration = arianeeConfig;
    this.web3 = container.resolve(Web3Service).web3;
  }

tsyringe

Lightweight dependency injection container for JavaScript/TypeScript

MIT
Latest version published 11 months ago

Package Health Score

78 / 100
Full package analysis