How to use the @tsed/di.Configuration function in @tsed/di

To help you get started, we’ve selected a few @tsed/di 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 TypedProject / ts-express-decorators / packages / common / src / mvc / services / ControllerService.ts View on Github external
constructor(
    private injectorService: InjectorService,
    @Configuration() private settings: Configuration,
    private routeService: RouteService
  ) {
    super(injectorService as any, {filter: {type: ProviderType.CONTROLLER}});
  }
github TypedProject / ts-express-decorators / packages / ajv / src / services / AjvService.ts View on Github external
constructor(
    private jsonSchemaService: JsonSchemesService,
    @Configuration() private configuration: Configuration,
    private converterService: ConverterService
  ) {
    super();

    const ajvSettings: IAjvSettings = this.configuration.get("ajv") || {};

    this.options = Object.assign(
      {
        verbose: false
      },
      ajvSettings.options || {}
    );

    this.ajv = new Ajv(this.options);

    this.errorFormatter = ajvSettings.errorFormat ? ajvSettings.errorFormat : this.defaultFormatter;