Variable: AsyncDIContainer
AsyncDIContainer: {new ():
AsyncDIContainer<{ }>;prototype:AsyncDIContainer<any>; }
Defined in: src/async-container.ts:108
Creates an AsyncDIContainer. Forks keep the async behaviour, and container instanceof AsyncDIContainer works.
Type Declaration
Returns
AsyncDIContainer<{ }>
prototype
readonlyprototype:AsyncDIContainer<any>
Example
ts
const app = new AsyncDIContainer().addSingleton('db', () => connect(url));
const db = await app.get('db');