How to use the typedi.Container.reset function in typedi

To help you get started, we’ve selected a few typedi 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 vesper-framework / vesper / src / index.ts View on Github external
if ("HttpQueryError" !== error.name)
                return next(error);

            if (error.headers) {
                Object.keys(error.headers).forEach(header => {
                    res.setHeader(header, error.headers[header]);
                });
            }

            res.statusCode = error.statusCode;
            res.write(error.message);
            res.end();

            // request has finished - reset container
            Container.reset(req);
        });
    };
github wemaintain / auto-relay / tests / helpers / auto-relay-runner.ts View on Github external
public async beforeSuite(configAutoRelay=true) {
    Container.reset();
    
    if(configAutoRelay) {
      new AutoRelayConfig(this.config);
    }

    if(this.runBefore) {
      await this.runBefore();
    }
  }
}
github MichalLytek / type-graphql / tests / functional / ioc-container.ts View on Github external
beforeEach(() => {
    getMetadataStorage().clear();
    Container.reset();
  });
github birkir / prime / packages / prime-core / src / new-server.ts View on Github external
formatResponse(response: any, resolver: ResolverData) {
      Container.reset(resolver.context.requestId);
      return response;
    },
  });
github birkir / prime / packages / prime-core / src / server.ts View on Github external
formatResponse(response: any, resolver: ResolverData) {
      Container.reset(resolver.context.requestId);
      return response;
    },
  });